[ https://issues.apache.org/jira/browse/CALCITE-3310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Danny Chan resolved CALCITE-3310. --------------------------------- Resolution: Fixed Fixed inĀ [81c768e|https://github.com/apache/calcite/commit/81c768e60078bcb6c8c78057d80090d27ac86030] ! > Approximate and exact aggregate calls are recognized as the same during > sql-to-rel conversion > --------------------------------------------------------------------------------------------- > > Key: CALCITE-3310 > URL: https://issues.apache.org/jira/browse/CALCITE-3310 > Project: Calcite > Issue Type: Bug > Components: core > Affects Versions: 1.20.0 > Reporter: Danny Chan > Assignee: Danny Chan > Priority: Major > Labels: pull-request-available > Fix For: 1.21.0 > > Time Spent: 50m > Remaining Estimate: 0h > > For sql: > {code:sql} > SELECT empno, count(distinct ename) > approx_count_distinct(ename) > FROM emp > GROUP BY empno > {code} > After sql-to-rel conversion, the plan is: > {code:sql} > LogicalProject(EMPNO=[$0], EXPR$1=[$1], EXPR$2=[$1]) > LogicalAggregate(group=[{0}], EXPR$1=[COUNT(DISTINCT $1)]) > LogicalProject(EMPNO=[$0], ENAME=[$1]) > LogicalTableScan(table=[[CATALOG, SALES, EMP]]) > {code} -- This message was sent by Atlassian Jira (v8.3.2#803003)