v.20.8Improvement

Enhance Monotonicity for toDate/toDateTime Functions in ClickHouse

Provide monotonicity for toDate/toDateTime functions in more cases. Monotonicity information is used for index analysis (more complex queries will be able to use index). Now the input arguments are saturated more naturally and provides better monotonicity. #13497 (Amos Bird).
Enhanced monotonicity detection for toDate and toDateTime functions, improving their use in index optimization.

Why it matters

This feature improves the accuracy of monotonicity information for toDate and toDateTime functions by handling input arguments more naturally. This leads to better index analysis and enables more complex queries to leverage indexes for improved performance.

How to use it

Users benefit from this feature automatically as it enhances the internal monotonicity detection logic. No explicit action is required; queries using toDate or toDateTime functions will have improved index usage where applicable.