[ 
https://issues.apache.org/jira/browse/CALCITE-1587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15828660#comment-15828660
 ] 

Gian Merlino commented on CALCITE-1587:
---------------------------------------

In Druid's SQL dialect, for distinct-count, even if you disable 
useApproximateCountDistinct you can still get the approximate algo by doing 
APPROX_COUNT_DISTINCT(col). We chose that since it seems to be the unofficial 
standard (bigquery, oracle, memsql all call it that).

We don't have anything in the dialect to get approximate topNs if you disabled 
the useApproximateTopN property though. Or, for that matter, to get exact ones 
if you enabled the property.

> Druid adapter: topN returns approximate results
> -----------------------------------------------
>
>                 Key: CALCITE-1587
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1587
>             Project: Calcite
>          Issue Type: Bug
>          Components: druid
>    Affects Versions: 1.11.0
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Julian Hyde
>             Fix For: 1.12.0
>
>
> Currently, we convert to _topN_ queries. However, metrics returned by Druid 
> will be approximate values. Thus, probably we should not convert to Druid 
> topN queries and rather always use Druid groupBy.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to