Open rfraposa opened 2 months ago
Interesting. This is the change log from Dec 23rd.
Fix check for non-deterministic functions in TTL expressions. Previously, you could create a TTL expression with non-deterministic functions in some cases, which could lead to undefined behavior later. This fixes #37250. Disallow TTL expressions that don't depend on any columns of a table by default. It can be allowed back by SET allow_suspicious_ttl_expressions = 1 or SET compatibility = '23.11'. Closes #37286. #51858 (Alexey Milovidov).
One solution is to have the following in the example:
CREATE OR REPLACE TABLE ttl_demo_1 (
id Int,
message String,
now Date default now()
)
ENGINE = MergeTree
ORDER BY id
TTL now + INTERVAL 1 MONTH;
It is not the best example, as naming something now is not great, but your text would be fine.
Good solution. Just name the column timestamp
to avoid any confusion with "now".
but then you comment about now, does not make sense :/
Module 11 uses
TTL now() + INTERVAL 1 MONTH
. It's not a trivial fix because it's in the recording, so maybe we add a comment or something to state it's not supported anymore.