You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Chris Baynes (Jira)" <ji...@apache.org> on 2019/08/30 09:02:00 UTC
[jira] [Commented] (CALCITE-3310) Approximate and exact aggregate
calls are recognized as the same during sql-to-rel conversion
[ https://issues.apache.org/jira/browse/CALCITE-3310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16919340#comment-16919340 ]
Chris Baynes commented on CALCITE-3310:
---------------------------------------
I may be wrong here but I seem to remember that the approximate flag is kept on the RelNode, it's just not printed in the plan.
> 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
> Fix For: 1.21.0
>
>
> 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)