v.20.7New Feature
Add minMap and maxMap support to SimpleAggregateFunction
AddminMapandmaxMapfunctions support toSimpleAggregateFunction. #12662 (Ildus Kurbangaliev).
Why it matters
This feature enables users to apply theminMap and maxMap functions as simple aggregate functions, allowing efficient computation of minimum and maximum values over map data types in aggregate queries. It enhances the flexibility and expressiveness of aggregation capabilities in ClickHouse.How to use it
UseSimpleAggregateFunction with minMap or maxMap as the aggregation function name and specify the map type as the data type parameter. For example:WITH SimpleAggregateFunction('minMap', Map(String, UInt64)) AS agg
SELECT agg(your_map_column) FROM your_tableThis will compute the minimum mapped values aggregated over rows.