v.23.5Improvement

Support for Storing Interval Data Types in Tables

Support storing Interval data types in tables. #49085 (larryluogit).
Support for storing Interval data types in ClickHouse tables.

Why it matters

This feature enables users to directly store Interval data types in tables, allowing easier manipulation and querying of time interval data. It solves the problem of handling intervals more natively and efficiently within ClickHouse, enhancing time-based data operations and analyses.

How to use it

To use this feature, define a column with the Interval data type in your table schema when creating or altering tables, for example:

CREATE TABLE example (
id UInt32,
duration Interval
) ENGINE = MergeTree() ORDER BY id;

You can then insert and query Interval values similarly to other data types.