hll_merge()(聚合函数)hll_merge() (aggregation function)

将组中的 HLL 结果合并为单个 HLL 值。Merges HLL results across the group into a single HLL value.

  • 只能在 summarize 内的聚合上下文中使用。Can be used only in context of aggregation inside summarize.

有关详细信息,请参阅基础算法 (HyperLogLog ) 和估算准确度For more information, see the underlying algorithm (HyperLogLog) and estimation accuracy.


summarize hll_merge(Expr)summarize hll_merge(Expr)


  • *Expr*:将要用于聚合计算的表达式。*Expr*: Expression that will be used for the aggregation calculation.


此函数返回组中 *Expr* 的合并 hll 值。The function returns the merged hll values of *Expr* across the group.


  1. 使用函数 [dcount_hll] (dcount-hllfunction.md) 根据 hll / hll-merge 聚合函数计算 dcountUse the function [dcount_hll] (dcount-hllfunction.md) to calculate the dcount from hll / hll-merge aggregation functions.