v.23.5Improvement
Support for Storing Interval Data Types in Tables
Support storing Interval data types in tables. #49085 (larryluogit).Why it matters
This feature enables users to directly storeInterval 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 theInterval 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.