v.21.4Improvements
Enhance MergeTree Table to Expose DateTime64 Values in System Parts and Columns
If partition key of aMergeTreetable does not includeDateorDateTimecolumns but includes exactly oneDateTime64column, expose its values in themin_timeandmax_timecolumns insystem.partsandsystem.parts_columnstables. Addmin_timeandmax_timecolumns tosystem.parts_columnstable (these was inconsistency to thesystem.partstable). This closes #18244. #22011 (alexey-milovidov).
Why it matters
Previously, thesystem.parts_columns table lacked the min_time and max_time columns which were available in system.parts, causing inconsistency when the partition key includes a single DateTime64 column without Date or DateTime. This feature adds these columns to both tables, improving metadata consistency and making it easier for users to query time range information for such tables.How to use it
No explicit user action is required. When usingMergeTree tables with a partition key that contains exactly one DateTime64 column and no Date or DateTime columns, the system.parts and system.parts_columns tables will automatically expose min_time and max_time columns reflecting the partition's time boundaries.