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

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

Can you update the Jira to make it clear which component is doing this. 

After your fix it seems that we generate APPROX_COUNT_DISTINCT on all dialects. 
Can you add a test for a dialect that does not have that function.

> 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