calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vihag Gupta <>
Subject Hyperunique aggregations in Calcite-Druid Adapter
Date Tue, 28 Feb 2017 03:55:37 GMT
In my Druid data source, I have a hyperUnique aggregation (ingestion time)
on one of the fields.

I am trying to do the equivalent of COUNT(DISTINCT(<hyperunique_field>)) on
this aggregated field.

Is it supported in the Calcite Druid Adapter? If so, what is the correct
way to go about it?

P.S. In plywood, I can do COUNT_DISTINCT

P.S. running the above returns 0 counts


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' and '2017-01-02
00:00:00' and “field_1" in (‘value_1') and “field_2”='value_2' and
“field_3”='value_3' and “field_4”='value_4' group by floor("__time" to
HOUR),”field_1" order by floor("__time" to HOUR);


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

Your help is much appreciated,


Vihag Gupta

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message