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 <[email protected]>
