v.21.8Improvement

Correct Exception Handling for Invalid Date Parsing

Correctly throw the exception on the attempt to parse an invalid Date. Closes #6481. #25909 (alexey-milovidov).
Improved error handling when parsing invalid Date values by correctly throwing an exception.

Why it matters

This feature addresses the issue where invalid Date inputs were not properly detected or caused inconsistent behavior. By throwing a clear exception, it helps users identify and fix data format errors early, improving data integrity and debugging experience.

How to use it

Users do not need to enable anything separately. The improved exception handling takes effect automatically when parsing Date values with invalid format in queries or data processing.