Skip to content

HIVE-30122: HiveAggregateJoinTransposeRule drops aggregate arguments from a unique join side, returning wrong results - #6988

Merged
kasakrisz merged 2 commits into
apache:masterfrom
kasakrisz:HIVE-30122-master-aggr-join-tr-cbo
Dec 1, 2026
Merged

kasakrisz merged 2 commits into
apache:masterfrom
kasakrisz:HIVE-30122-master-aggr-join-tr-cbo

Conversation

@kasakrisz

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Update HiveAggregateJoinTransposeRule from https://github.com/apache/calcite/blob/b1d807862c53ff4eafd5412f096726534f45c3fb/core/src/main/java/org/apache/calcite/rel/rules/AggregateJoinTransposeRule.java#L248-L276

Why are the changes needed?

Port
Calcite #5324
CALCITE-7851
to fix the correctness issue described in HIVE-30122

Does this PR introduce any user-facing change?

Yes, see details in HIVE-30122

How was this patch tested?

mvn test -Dtest.output.overwrite -Dtest=TestMiniLlapLocalCliDriver -Dqfile=aggregate_join_transpose_unique.q -pl itests/qtest -Pitests

@kasakrisz
kasakrisz force-pushed the HIVE-30122-master-aggr-join-tr-cbo branch from 823a234 to 054da84 Compare December 1, 2026 12:51

@deniskuzZ deniskuzZ left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, pending tests

@sonarqubecloud

sonarqubecloud Bot commented Dec 1, 2026

Copy link
Copy Markdown

@kasakrisz
kasakrisz merged commit 8a688eb into apache:master Dec 1, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants