v.24.9Improvement
Improve DateTime Schema Inference with Stricter Handling
Improve schema inference of date times. NowDateTime64used only when date time has fractional part, otherwise regular DateTime is used. Inference of Date/DateTime is more strict now, especially whendate_time_input_format='best_effort'to avoid inferring date times from strings in corner cases. #68382 (Kruglov Pavel).
Why it matters
To enhance the accuracy of automatic schema detection for date and date-time columns by avoiding incorrect inferences in edge cases and only usingDateTime64 when fractional parts exist. This reduces mistaken data type assignments and improves data handling consistency.How to use it
Users benefit from improved inference automatically when importing data. To leverage stricter inference, set the settingdate_time_input_format='best_effort' when parsing date-time strings to ensure safer and more precise type detection.