给 Databend 添加 Aggregate 函数 | 函数开发系例二
在介绍 Scalar Function(给 Databend 添加 Scalar 函数 | 函数开发系例一) 后,我们来看 Aggregate Function。 Aggregate Function 用于对列的值进行操作并返回单个值。常见的 Agg Function 有 sum, count, avg 等。 函数注册 Agg Function 的 register 函数以小写的函数名和 AggregateFunctionDescription 类型为参数,每个被注册的函数都存入 case_insensitive_desc ( HashMap 结构) 中。 而 case_insensitive_combinator_desc 是为了存储一些组合函数,比如与 _if 组合的 count_if, sum_if 这类函数。 pubstructAggregateFunctionFactory{ case_insensitive_desc:HashMap<String,AggregateFunctionDescription>, case_insensitive_combinator...







