v.23.4Improvement

Add Date, Date32, DateTime, and DateTime64 Support to Array Functions

Add support for Date, Date32, DateTime, DateTime64 data types to arrayMin, arrayMax, arrayDifference functions. Closes #21645. #48445 (Nikolay Degterinsky).
Added support for Date, Date32, DateTime, and DateTime64 data types in the arrayMin, arrayMax, and arrayDifference functions.

Why it matters

This feature enables users to apply the arrayMin, arrayMax, and arrayDifference functions directly on arrays containing date and datetime values, solving the previous limitation where these functions did not support date/time types. It enhances the versatility and usability of array functions for time-series and date-related data processing.

How to use it

Users can now use arrayMin, arrayMax, and arrayDifference functions with arrays of Date, Date32, DateTime, and DateTime64 types without any special configuration. Simply pass arrays of these data types as arguments to the functions in SQL queries, for example:

SELECT arrayMin(date_array), arrayMax(date_array), arrayDifference(date_array) FROM table