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:19:00 UTC
[jira] [Resolved] (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:all-tabpanel ]
duan xiong resolved CALCITE-4700.
---------------------------------
Fix Version/s: 1.29.0
Resolution: Fixed
> 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
> Fix For: 1.29.0
>
> 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)