v.21.8Improvement

Allow quantiles functions to work with aggregate_functions_null_for_empty

Allow quantiles* functions to work with aggregate_functions_null_for_empty. Close #25892. #25919 (alexey-milovidov).
Allow quantiles* aggregate functions to return NULL when used with aggregate_functions_null_for_empty.

Why it matters

This feature enables quantiles* functions to integrate properly with the aggregate_functions_null_for_empty setting, allowing them to return NULL instead of default or zero values when aggregating empty datasets. It improves the accuracy of query results by clearly signaling empty input for quantile calculations.

How to use it

To apply this feature, set aggregate_functions_null_for_empty=1 in your session or server configuration. Then, when using quantiles* functions, they will return NULL for empty inputs instead of default values.