v.19.8New Features
Added New Data Type Simpleaggregatefunction, Which Allows to Have Columns with Light Aggregation in an Aggregatingmergetree
Added new data typeSimpleAggregateFunction, which allows to have columns with light aggregation in anAggregatingMergeTree. This can only be used with simple functions likeany,anyLast,sum,min,max. #4629 (Boris Granveaud)
Why it matters
This feature addresses the need for efficient aggregation of simple functions such asany, 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 inAggregatingMergeTree 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 idThis will enable light aggregation using the specified simple function.