v.25.5Experimental Feature

New Time/Time64 data types: Time (HHH:MM:SS) and

New Time/Time64 data types: Time (HHH:MM:SS) and Time64 (HHH:MM:SS.<fractional>) and some basic cast functions and functions to interact with other data types. Also, changed the existing function's name toTime to toTimeWithFixedDate because the function toTime is required for the cast function. #75735 (Yarik Briukhovetskyi). 72459).
Introduces new data types Time (format HHH:MM:SS) and Time64 (format HHH:MM:SS.) along with basic cast functions and utilities for interoperability with other data types. The existing toTime function has been renamed to toTimeWithFixedDate to free the toTime name for casting purposes.

Why it matters

This feature provides more precise and flexible time representations supporting hours beyond 24 and fractional seconds, which were not adequately handled before. It enables users to work with extended time intervals and high-precision time data natively in ClickHouse, improving time-related querying and type casting capabilities.

How to use it

Use the new Time and Time64 data types when defining table schema or casting values. Cast to Time or Time64 using the newly defined toTime cast function. Note that the previous toTime function has been renamed to toTimeWithFixedDate to avoid naming conflicts.