Company or project name
CloudQuery
Describe what's wrong
This is supposed to be disallowed since ClickHouse/ClickHouse#51858, but I noticed that now() is silently allowed. So I tried reproducing it on fiddle using rand():
CREATE TABLE users (uid Int16, ts DateTime) ENGINE=MergeTree ORDER BY uid
TTL ts + INTERVAL 1 SECOND DELETE WHERE ts>0 and rand()<2147483647;
insert into users(uid, ts) values (123, now()-interval 5 second);
select * from users;
optimize table users final;
select * from users;
Run that a few times and observe that the row isn't deleted ~50% of the time. I've checked that allow_suspicious_ttl_expressions isn't enabled.
Does it reproduce on the most recent release?
Yes
How to reproduce
- Run the above fiddle.
- Observe that the row isn't deleted ~50% of the time.
Expected behavior
Either rand() (and now(), now64() etc.) shouldn't be allowed, or they should be explicitly supported.
Error message and/or stacktrace
No response
Additional context
No response
Company or project name
CloudQuery
Describe what's wrong
This is supposed to be disallowed since ClickHouse/ClickHouse#51858, but I noticed that
now()is silently allowed. So I tried reproducing it on fiddle usingrand():Run that a few times and observe that the row isn't deleted ~50% of the time. I've checked that
allow_suspicious_ttl_expressionsisn't enabled.Does it reproduce on the most recent release?
Yes
How to reproduce
Expected behavior
Either
rand()(andnow(),now64()etc.) shouldn't be allowed, or they should be explicitly supported.Error message and/or stacktrace
No response
Additional context
No response