v.25.6Improvement

Add support for Date32 and DateTime64

Added support for Date32 and DateTime64 in TTL expressions. #80710 (Andrey Zvonov).
Added support for Date32 and DateTime64 data types in TTL expressions, enabling time-to-live logic for these types.

Why it matters

This feature allows users to define TTL rules on columns of types Date32 and DateTime64, expanding the scenarios where automatic data expiration and cleanup can be applied. It enhances data management capabilities by supporting more precise date and time types in lifecycle policies.

How to use it

Users can now specify TTL expressions using columns of type Date32 or DateTime64 in their table definitions or with ALTER TABLE commands as usual, for example:

CREATE TABLE example (
event_date Date32,
event_time DateTime64(3),
...
) ENGINE = MergeTree()
TTL event_date + INTERVAL 30 DAY;


This will enable automatic data expiration based on Date32 or DateTime64 values.