v.19.8New Features

Added New Data Type Simpleaggregatefunction, Which Allows to Have Columns with Light Aggregation in an Aggregatingmergetree

Added new data type SimpleAggregateFunction, which allows to have columns with light aggregation in an AggregatingMergeTree. This can only be used with simple functions like any, anyLast, sum, min, max. #4629 (Boris Granveaud)
Introduced the new data type SimpleAggregateFunction, enabling columns with lightweight aggregation support in AggregatingMergeTree tables using basic aggregate functions.

Why it matters

This feature addresses the need for efficient aggregation of simple functions such as any, anyLast, sum, min, and max within AggregatingMergeTree tables. It simplifies the management of aggregated data by allowing direct use of these lightweight aggregate functions as column types, improving performance and usability.

How to use it

Define columns in AggregatingMergeTree tables using the SimpleAggregateFunction data type with one of the supported simple aggregate functions. For example:

CREATE TABLE example (
id UInt64,
agg_col SimpleAggregateFunction(sum, Int32)
) ENGINE = AggregatingMergeTree()
ORDER BY id


This will enable light aggregation using the specified simple function.