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

将 tdigest 结果合并到组中。Merges tdigest results across the group.

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

此处详细了解基础算法 (T-Digest) 和预估误差。Read more about the underlying algorithm (T-Digest) and the estimated error here.

语法Syntax

summarize tdigest_merge(Expr)summarize tdigest_merge(Expr).

summarize tdigest_merge(Expr) - 别名。summarize tdigest_merge(Expr) - An alias.

参数Arguments

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

返回Returns

组中 Expr 的合并 tdigest 值。The merged tdigest values of Expr across the group.

提示Tips

  1. 可以使用函数 [percentile_tdigest()] (percentile-tdigestfunction.md)。You may use the function [percentile_tdigest()] (percentile-tdigestfunction.md).

  2. 同一组中包含的所有 tdigest 必须属于同一类型。All tdigests that are included in the same group must be of the same type.