[
https://issues.apache.org/jira/browse/CALCITE-3448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
jin xing updated CALCITE-3448:
------------------------------
Description:
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
> AggregateOnProjectToAggregateUnifyRule 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
> Time Spent: 10m
> 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)