You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/02/28 23:12:00 UTC
[jira] [Updated] (CALCITE-896) Remove Aggregate if grouping columns
are unique and all functions are splittable
[ https://issues.apache.org/jira/browse/CALCITE-896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated CALCITE-896:
-----------------------------------
Labels: pull-request-available (was: )
> Remove Aggregate if grouping columns are unique and all functions are splittable
> --------------------------------------------------------------------------------
>
> Key: CALCITE-896
> URL: https://issues.apache.org/jira/browse/CALCITE-896
> Project: Calcite
> Issue Type: Bug
> Reporter: Julian Hyde
> Priority: Major
> Labels: pull-request-available
>
> Remove Aggregate if grouping columns are unique and all functions are splittable. Currently AggregateRemoveRule is only applied if there are no aggregate functions. But we could optimize
> {code}select deptno, count(name) from dept group by deptno{code}
> to
> {code}select deptno, 1 from dept{code}
> because we know deptno is unique, name is not null, and a singleton count applied to a not null column evaluates to 1.
> See AggregateJoinTransposeRule; it already makes use of SqlSplittableAggFunction.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)