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

Julian Hyde commented on CALCITE-4997:
--------------------------------------

Can you explain why you think it was incorrect in this case? It is certainly 
*valid* to transform approximate to exact (i.e. the results will not be 
incorrect), and may be the best plan if there is no way to evaluate 
approximately.

> approx_count_distinct function was incorrectly converted to count(distinct )
> ----------------------------------------------------------------------------
>
>                 Key: CALCITE-4997
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4997
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.29.0
>            Reporter: xiejiajun
>            Priority: Major
>
> {code:java}
> SELECT APPROX_COUNT_DISTINCT(product_id)
> FROM foodmart.product
> {code}
> will be
> {code:java}
> SELECT COUNT(DISTINCT product_id)
> FROM foodmart.product
> {code}
> This can cause many tasks to run too slowly.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to