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:00 UTC

[Impala-ASF-CR] PROTOTYPE: Also try min-row join orders in LoptOptimizeJoinRule

Zoltan Borok-Nagy has uploaded this change for review. ( http://gerrit.cloudera.org:8080/25091


Change subject: PROTOTYPE: Also try min-row join orders in LoptOptimizeJoinRule
......................................................................

PROTOTYPE: Also try min-row join orders in LoptOptimizeJoinRule

For each starting factor, ImpalaLoptOptimizeJoinRule builds one join
order: it adds next the factor with the highest join weight, ignoring
row counts. In TPC-DS q72 this kept large intermediate results.

For each starting factor the rule now also builds a second order that
adds next the connected factor whose join with the current tree has the
fewest estimated rows, and the cost model chooses among all orders.
Removable joins and cross products fall back to the weight-based
choice. The rule considers twice as many orders.

Testing:
- TPC-DS SF1000, 8 executors, MT_DOP=8, PLANNER=CALCITE,
  CTE_THRESHOLD=1, on top of earlier prototypes: q72 16.4 s -> 8.9 s
  together with BROADCAST_BYTES_LIMIT=1g; without that option, q29,
  q64 and q72 together 28.3 s -> 27.7 s. No new tests.

Change-Id: Ifd7aa66badb3048a45598931d1b57303978ec9bc
Assisted-by: Claude Opus 5.5 (Claude Code)
---
M java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/ImpalaLoptOptimizeJoinRule.java
1 file changed, 81 insertions(+), 17 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/91/25091/1
-- 
To view, visit http://gerrit.cloudera.org:8080/25091
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd7aa66badb3048a45598931d1b57303978ec9bc
Gerrit-Change-Number: 25091
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>

[Impala-ASF-CR] PROTOTYPE: Also try min-row join orders in LoptOptimizeJoinRule

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/25091 )

Change subject: PROTOTYPE: Also try min-row join orders in LoptOptimizeJoinRule
......................................................................


Patch Set 1:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/24467/ : 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/25091
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifd7aa66badb3048a45598931d1b57303978ec9bc
Gerrit-Change-Number: 25091
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:31:40 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] PROTOTYPE IMPALA-15665: Also try min-row join orders in LoptOptimizeJoinRule

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/25091

to look at the new patch set (#2).

Change subject: PROTOTYPE IMPALA-15665: Also try min-row join orders in LoptOptimizeJoinRule
......................................................................

PROTOTYPE IMPALA-15665: Also try min-row join orders in LoptOptimizeJoinRule

For each starting factor, ImpalaLoptOptimizeJoinRule builds one join
order: it adds next the factor with the highest join weight, ignoring
row counts. In TPC-DS q72 this kept large intermediate results.

For each starting factor the rule now also builds a second order that
adds next the connected factor whose join with the current tree has the
fewest estimated rows, and the cost model chooses among all orders.
Removable joins and cross products fall back to the weight-based
choice. The rule considers twice as many orders.

Testing:
- TPC-DS SF1000, 8 executors, MT_DOP=8, PLANNER=CALCITE,
  CTE_THRESHOLD=1, on top of earlier prototypes: q72 16.4 s -> 8.9 s
  together with BROADCAST_BYTES_LIMIT=1g; without that option, q29,
  q64 and q72 together 28.3 s -> 27.7 s. No new tests.

Change-Id: Ifd7aa66badb3048a45598931d1b57303978ec9bc
Assisted-by: Claude Opus 5.5 (Claude Code)
---
M java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/ImpalaLoptOptimizeJoinRule.java
1 file changed, 81 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/91/25091/2
-- 
To view, visit http://gerrit.cloudera.org:8080/25091
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ifd7aa66badb3048a45598931d1b57303978ec9bc
Gerrit-Change-Number: 25091
Gerrit-PatchSet: 2
Gerrit-Owner: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>