calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nishant Bangarwa (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CALCITE-1670) Count distinct on druid is translated to Cardinality aggregator which is approximate
Date Fri, 03 Mar 2017 14:26:45 GMT
Nishant Bangarwa created CALCITE-1670:
-----------------------------------------

             Summary: Count distinct on druid is translated to Cardinality aggregator which
is approximate
                 Key: CALCITE-1670
                 URL: https://issues.apache.org/jira/browse/CALCITE-1670
             Project: Calcite
          Issue Type: Bug
            Reporter: Nishant Bangarwa
            Assignee: Julian Hyde


Right now count distinct on Druid is pushed as a 'cardinality' aggregator which uses hyperloglog
and return approximate results. See cardinality aggregator here - http://druid.io/docs/latest/querying/aggregations.html
for details. 

https://github.com/apache/calcite/blob/master/druid/src/main/java/org/apache/calcite/adapter/druid/DruidQuery.java#L721
{code} 
case COUNT:
      if (aggCall.isDistinct()) {
        return new JsonCardinalityAggregation("cardinality", name, list);
      }
      return new JsonAggregation("count", name, only);
{code} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message