[ 
https://issues.apache.org/jira/browse/CALCITE-3448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Haisheng Yuan resolved CALCITE-3448.
------------------------------------
    Fix Version/s: 1.22.0
       Resolution: Fixed

Fixed in 
https://github.com/apache/calcite/commit/3853118b4d1d48f7d3970b5488baf7ca78d5028e,
 thanks for the PR, [~jinxing6...@126.com]!

> AggregateOnCalcToAggregateUnifyRule ignores Project incorrectly when there's 
> missing grouping or mapping breaks ordering
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-3448
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3448
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Jin Xing
>            Assignee: Jin Xing
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.22.0
>
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> CALCITE-3087 fixed AggregateOnProjectToAggregateUnifyRule when mapping under 
> Aggregate breaks ordering. But it fails when there's missing grouping in 
> query compared with target.
> Below matching fails:
> {code:java}
> MV:
>  select empid, deptno, name, count(*) from emps
>  group by empid, deptno, name
> Query:
>  select name, empid, count(*) from emps group by name, empid{code}
> Note that -- comparing groupings in MV (empid, deptno, name) and groupings in 
> query (name, empid), deptno is missed and ordering is broken



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to