v.20.3Improvement

Return NULL/zero for incomplete parse in parseDateTimeBestEffortOrNull/Zero functions

Return NULL/zero when value is not parsed completely in parseDateTimeBestEffortOrNull/Zero functions. This fixes #7876. #11653 (alexey-milovidov).
Improved handling of incomplete datetime parsing in parseDateTimeBestEffortOrNull and parseDateTimeBestEffortOrZero functions.

Why it matters

This feature ensures that when datetime values cannot be fully parsed by parseDateTimeBestEffortOrNull or parseDateTimeBestEffortOrZero, the functions return NULL or zero respectively instead of returning partially parsed or incorrect data. This fix addresses issue #7876, enhancing data accuracy and reliability when parsing datetime inputs with these functions.

How to use it

Users can benefit from this behavior automatically by using the existing functions parseDateTimeBestEffortOrNull or parseDateTimeBestEffortOrZero in their queries. No additional configuration or changes are needed; the functions now reliably return NULL or zero for incomplete datetime strings.