v.22.10Improvement
Improve DateTime Type Inference for Text Formats in ClickHouse
ImproveDateTimetype inference for text formats. Now it respects settingdate_time_input_formatand doesn't try to infer datetimes from numbers as timestamps. Closes #41389 Closes #42206. #41912 (Kruglov Pavel).
Why it matters
This feature addresses issues whereDateTime values were inaccurately inferred from numbers when reading text data formats, disregarding the configured date_time_input_format. It ensures consistent and predictable parsing of datetime inputs, enhancing data import reliability and preventing erroneous timestamp conversions.How to use it
Users should configure thedate_time_input_format setting according to their input format requirements. The improved inference mechanism will automatically respect this setting when parsing DateTime columns from text formats, eliminating the need for additional changes in query syntax or data imports.