You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Danny Chan (Jira)" <ji...@apache.org> on 2019/08/30 07:28:00 UTC
[jira] [Created] (CALCITE-3310) Approximate and exact aggregate
calls are recognized as the same during sql-to-rel conversion
Danny Chan created CALCITE-3310:
-----------------------------------
Summary: 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
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)