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

Change subject: IMPALA-14105: Calcite planner: Runtime filters not being 
applied with outer joins
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/23318/2/java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/node/ImpalaJoinRel.java
File 
java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/node/ImpalaJoinRel.java:

http://gerrit.cloudera.org:8080/#/c/23318/2/java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/node/ImpalaJoinRel.java@492
PS2, Line 492:         joinOp == JoinOperator.FULL_OUTER_JOIN)) {
For Full Outer Join, the Analyzer has a separate method to register the tuple 
ids:  registerFullOuterJoinedTids [1].  Shouldn't we use that ? The reason is 
the GlobalState class maintains separate hash maps for left/right outer joins 
and one for full outer joins and these maps get populated in different methods.

Actually .. after looking some more at 
Analyzer.constructValueTransfersFromEqPredicates(),  it skips value transfer 
for Full Outer Joins (see [2]) because it is not safe and we should not do that 
either in the Calcite planner.

The outer join types that are considered for value transfers are 
LEFT_OUTER_JOIN, LEFT_ANTI_JOIN, NULL_AWARE_LEFT_ANTI_JOIN, RIGHT_OUTER_JOIN, 
RIGHT_ANTI_JOIN


[1] 
https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/analysis/Analyzer.java#L1310
[2] 
https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/analysis/Analyzer.java#L3317



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I9e06d3f35a10f35ff8b57ba25dbab1bc6a35238a
Gerrit-Change-Number: 23318
Gerrit-PatchSet: 2
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: Riza Suminto <[email protected]>
Gerrit-Comment-Date: Fri, 19 Sep 2025 22:35:17 +0000
Gerrit-HasComments: Yes

Reply via email to