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

ASF GitHub Bot updated CALCITE-4700:
------------------------------------
    Labels: pull-request-available  (was: )

> AggregateUnionTransposeRule produces wrong group sets for the top Aggregate
> ---------------------------------------------------------------------------
>
>                 Key: CALCITE-4700
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4700
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.28.0
>            Reporter: Vladimir Ozerov
>            Assignee: Vladimir Ozerov
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Consider the following tree:
> {code}
> LogicalAggregate[groupSet=$1, ...]
>   LogicalUnion
>     Input
> {code}
> When the rule is applied, the top-level Aggregate receives the same group set 
> as the original Aggregate, which is wrong because it points to an incorrect 
> attribute.
> {code}
> LogicalAggregate[groupSet=$1, ...] // <- wrong
>   LogicalUnion
>     LogicalAggregate[groupSet=$1, ...]
>       Input
> {code}
> The correct plan should be:
> {code}
> LogicalAggregate[groupSet=$0, ...]
>   LogicalUnion
>     LogicalAggregate[groupSet=$1, ...]
>       Input
> {code}



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

Reply via email to