v.21.3Improvement

Usability Improvement: Enhanced DateTime64 Parsing for Subsecond Resolution

Usability improvement: more consistent DateTime64 parsing: recognize the case when unix timestamp with subsecond resolution is specified as scaled integer (like 1111111111222 instead of 1111111111.222). This closes #13194. #21053 (alexey-milovidov).
Improved DateTime64 parsing to consistently recognize unix timestamps with subsecond precision given as scaled integers (e.g., 1111111111222) in addition to decimal notation (e.g., 1111111111.222).

Why it matters

This feature addresses inconsistencies in parsing DateTime64 values by enabling ClickHouse to correctly interpret scaled integer representations of unix timestamps with subsecond resolution. It enhances usability by supporting a more flexible input format, reducing errors and making data ingestion easier for users dealing with high-precision time values.

How to use it

Users can benefit from this improved parsing automatically without any configuration changes. When inserting or querying DateTime64 data, both subsecond timestamps as decimals and as scaled integers will be correctly recognized and parsed.