Aman Sinha has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/23924 )

Change subject: IMPALA-14102: [part 3] Modified LoptOptimizeJoinRule with 
Impala changes
......................................................................


Patch Set 6:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/23924/6/java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/ImpalaLoptOptimizeJoinRule.java
File 
java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/ImpalaLoptOptimizeJoinRule.java:

http://gerrit.cloudera.org:8080/#/c/23924/6/java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/ImpalaLoptOptimizeJoinRule.java@1930
PS6, Line 1930:   public static boolean swapInputs(RelMetadataQuery mq, 
LoptMultiJoin multiJoin,
One of the things that Impala's  Planner.isInvertedJoinsCheaper() [1]  
considers is the parallelism (besides the cost).  There are situations where if 
you only make the decision based on cost, the probe side can end up with much 
lower parallelism than without swapping and this adversely affects performance 
because the HashJoin node's parallelism depends on the left input's (probe) 
parallelism.  Is the numNodes value available at this stage in the Calcite 
planning for the left and right child ?  If so, it would be useful to 
incorporate.  Whether in this patch or an enhancement.

[1] 
https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/planner/Planner.java#L826



--
To view, visit http://gerrit.cloudera.org:8080/23924
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I168ae903934c5c74520a22605e73f71dc0a9d549
Gerrit-Change-Number: 23924
Gerrit-PatchSet: 6
Gerrit-Owner: Steve Carlin <[email protected]>
Gerrit-Reviewer: Aman Sinha <[email protected]>
Gerrit-Reviewer: Fang-Yu Rao <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>
Gerrit-Comment-Date: Sat, 14 Feb 2026 20:31:57 +0000
Gerrit-HasComments: Yes

Reply via email to