v.21.3Improvement
Fix DateTime64 Clamping to Match DateTime Behavior
Fix toDateTime64(toDate()/toDateTime()) for DateTime64 - Implement DateTime64 clamping to match DateTime behaviour. #20131 (Azat Khuzhin).
Why it matters
This fix addresses inconsistencies in the clamping behavior ofDateTime64 when converting from Date or DateTime. It ensures that the result of these conversions respects the same limits as DateTime, preventing unexpected out-of-range values and improving reliability.How to use it
Users benefit from this fix automatically when converting withtoDateTime64(toDate()) or toDateTime64(toDateTime()), as the clamping behavior now aligns with DateTime. No special configuration is required.