You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Haisheng Yuan (Jira)" <ji...@apache.org> on 2022/04/15 03:54:00 UTC
[jira] [Resolved] (CALCITE-5000) Expand rule of `AGGREGATE_REDUCE_FUNCTIONS`, when arg of agg-call is in the aggregate's group
[ https://issues.apache.org/jira/browse/CALCITE-5000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Haisheng Yuan resolved CALCITE-5000.
------------------------------------
Fix Version/s: 1.30.0
Resolution: Fixed
Fixed in https://github.com/apache/calcite/commit/c8d1cb5a1e1b1dd98966c29308bc6b1aed245501, thanks for your PR, [~wojustme]!
> Expand rule of `AGGREGATE_REDUCE_FUNCTIONS`, when arg of agg-call is in the aggregate's group
> ---------------------------------------------------------------------------------------------
>
> Key: CALCITE-5000
> URL: https://issues.apache.org/jira/browse/CALCITE-5000
> Project: Calcite
> Issue Type: Improvement
> Reporter: Xurenhe
> Assignee: Xurenhe
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.30.0
>
> Time Spent: 2.5h
> Remaining Estimate: 0h
>
> Using calcite'sĀ SubstitutionVisitor, we need do a lot work aboutĀ canonicalizing relnode.
> Some sql should be simplified.
> {noformat}
> -- origin sql
> select deptno, salary, max(salary), min(commission)
> from emps
> group by deptno, salary
> -- simplified
> select deptno, salary, salary as expr, min(commission)
> from emps
> group by deptno, salary{noformat}
> It should be simplified, but I didn't find any rule to simplify it.
> This issue is related to CALCITE-4857
--
This message was sent by Atlassian Jira
(v8.20.1#820001)