【问题标题】:Hyperunique Aggregations in Calcite-Druid AdapterCalcite-Druid 适配器中的超唯一聚合
【发布时间】:2017-07-18 21:44:00
【问题描述】:

在我的 Druid 数据源中,我在其中一个字段上有一个 hyperUnique 聚合(摄取时间)。

我正在尝试在此聚合字段上执行与 COUNT(DISTINCT(<hyperunique_field>)) 等效的操作。

方解石德鲁伊适配器是否支持它?如果是这样,正确的做法是什么?

在胶合板中,我可以做到COUNT_DISTINCT。运行此返回 0 个计数。

SQL:

select floor("__time" to HOUR) time_bucket,"field_1", count(distinct("ingestion_time_aggregated_field")) as uniq from "datasource" where "__time" between '2017-01-01 00:00:00'和 '2017-01-02 00:00:00' 和 “field_1” 在 ('value_1') 和 “field_2”='value_2' 和 “field_3”='value_3' 和 “field_4”='value_4' 按楼层分组("__time" to HOUR),"field_1" order by floor("__time" to HOUR);

摄取时间_聚合字段

{"name": "ingestion_time_aggregated_field", "type": "hyperUnique","fieldName": “field” }

【问题讨论】:

    标签: druid apache-calcite


    【解决方案1】:

    适应的方解石德鲁伊不支持复杂的聚合器。原因是 HLL 是一个近似值而不是精确值,因此它实际上并不能回答唯一计数的查询。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-22
      • 2015-12-11
      • 1970-01-01
      • 1970-01-01
      • 2016-08-21
      • 1970-01-01
      相关资源
      最近更新 更多