v.20.7New Feature

Add minMap and maxMap support to SimpleAggregateFunction

Add minMap and maxMap functions support to SimpleAggregateFunction. #12662 (Ildus Kurbangaliev).
Added support for minMap and maxMap aggregate functions within SimpleAggregateFunction.

Why it matters

This feature enables users to apply the minMap 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

Use SimpleAggregateFunction 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_table


This will compute the minimum mapped values aggregated over rows.