You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Zoltan Borok-Nagy (Code Review)" <ge...@cloudera.org> on 2026/10/10 19:47:04 UTC
[Impala-ASF-CR] PROTOTYPE: Push aggregations below fact-dimension joins
Zoltan Borok-Nagy has uploaded this change for review. ( http://gerrit.cloudera.org:8080/25093
Change subject: PROTOTYPE: Push aggregations below fact-dimension joins
......................................................................
PROTOTYPE: Push aggregations below fact-dimension joins
TPC-DS q4, q11 and q74 join a large fact table with customer and then
group by customer attributes. The join processes every fact row,
although grouping the fact rows by the customer key first would shrink
them a lot.
A rule based on Calcite's AggregateJoinTransposeRule now runs after
join ordering, before CTE substitution. It fires on an inner join only
if the aggregation groups by attributes of a side that is unique on
its join key, and the other side has at least 10M rows and is
estimated to shrink to at most 5% of them. CalciteTable now reports
the table's primary key to Calcite, so the unique side is recognized.
Testing:
- TPC-DS SF1000, 8 executors, MT_DOP=8, PLANNER=CALCITE,
CTE_THRESHOLD=1, on top of earlier prototypes: q4 13.0 s -> 7.6 s,
q11 8.1 s -> 4.9 s, q74 6.5 s -> 3.9 s. Results matched. No new
tests.
Change-Id: Ie050224c97a18ce628eda0a07a06f20310154ebf
Assisted-by: Claude Opus 5.5 (Claude Code)
---
A java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/ImpalaAggregateJoinTransposeRule.java
M java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/CalciteTable.java
M java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteOptimizer.java
3 files changed, 151 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/93/25093/1
--
To view, visit http://gerrit.cloudera.org:8080/25093
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie050224c97a18ce628eda0a07a06f20310154ebf
Gerrit-Change-Number: 25093
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
[Impala-ASF-CR] PROTOTYPE IMPALA-15668: Push aggregations below fact-dimension joins
Posted by "Zoltan Borok-Nagy (Code Review)" <ge...@cloudera.org>.
Hello Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/25093
to look at the new patch set (#2).
Change subject: PROTOTYPE IMPALA-15668: Push aggregations below fact-dimension joins
......................................................................
PROTOTYPE IMPALA-15668: Push aggregations below fact-dimension joins
TPC-DS q4, q11 and q74 join a large fact table with customer and then
group by customer attributes. The join processes every fact row,
although grouping the fact rows by the customer key first would shrink
them a lot.
A rule based on Calcite's AggregateJoinTransposeRule now runs after
join ordering, before CTE substitution. It fires on an inner join only
if the aggregation groups by attributes of a side that is unique on
its join key, and the other side has at least 10M rows and is
estimated to shrink to at most 5% of them. CalciteTable now reports
the table's primary key to Calcite, so the unique side is recognized.
Testing:
- TPC-DS SF1000, 8 executors, MT_DOP=8, PLANNER=CALCITE,
CTE_THRESHOLD=1, on top of earlier prototypes: q4 13.0 s -> 7.6 s,
q11 8.1 s -> 4.9 s, q74 6.5 s -> 3.9 s. Results matched. No new
tests.
Change-Id: Ie050224c97a18ce628eda0a07a06f20310154ebf
Assisted-by: Claude Opus 5.5 (Claude Code)
---
A java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/ImpalaAggregateJoinTransposeRule.java
M java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/CalciteTable.java
M java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteOptimizer.java
3 files changed, 151 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/93/25093/2
--
To view, visit http://gerrit.cloudera.org:8080/25093
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie050224c97a18ce628eda0a07a06f20310154ebf
Gerrit-Change-Number: 25093
Gerrit-PatchSet: 2
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
[Impala-ASF-CR] PROTOTYPE: Push aggregations below fact-dimension joins
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/25093 )
Change subject: PROTOTYPE: Push aggregations below fact-dimension joins
......................................................................
Patch Set 1:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/24469/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/25093
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie050224c97a18ce628eda0a07a06f20310154ebf
Gerrit-Change-Number: 25093
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Sat, 10 Oct 2026 20:33:24 +0000
Gerrit-HasComments: No