You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "duan xiong (Jira)" <ji...@apache.org> on 2021/12/18 11:18:00 UTC

[jira] [Commented] (CALCITE-4700) AggregateUnionTransposeRule produces wrong group sets for the top Aggregate

    [ https://issues.apache.org/jira/browse/CALCITE-4700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17461868#comment-17461868 ] 

duan xiong commented on CALCITE-4700:
-------------------------------------

Fixed in [538016e|https://github.com/apache/calcite/commit/538016eec2b174ac159dfc0b8886671670ee555a]. Thanks for your PR [~vozerov] .

> 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: 1h
>  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.20.1#820001)