morrySnow commented on code in PR #64898:
URL: https://github.com/apache/doris/pull/64898#discussion_r3518145361
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownJoinOtherCondition.java:
##########
@@ -86,7 +86,16 @@ && allCoveredBy(otherConjunct, join.left().getOutputSet())) {
leftConjuncts.add(otherConjunct);
} else if
(PUSH_DOWN_RIGHT_VALID_TYPE.contains(join.getJoinType())
&& allCoveredBy(otherConjunct,
join.right().getOutputSet())) {
- rightConjuncts.add(otherConjunct);
+ // For NULL_AWARE_LEFT_ANTI_JOIN (NOT IN
subquery), when hash join
Review Comment:
**Note:** This fix correctly targets the specific bug where `InApplyToJoin`
creates a `NULL_AWARE_LEFT_ANTI_JOIN` with the correlation condition in
`otherJoinConjuncts` (not `hashJoinConjuncts`). At this point in the pipeline,
`FindHashConditionForJoin` has not yet run, so all NAAJ have empty
`hashJoinConjuncts`.
A potential follow-up: `JoinExtractOrFromCaseWhen` at line 182 uses
`PUSH_DOWN_RIGHT_VALID_TYPE` without a null-awareness guard. If it extracts
right-side-only conditions from a CASE WHEN expression in a NAAJ join
condition, those extracted conditions could encounter a similar issue. Consider
adding a null-awareness check there as well for consistency with
`PushDownFilterThroughJoin` which already excludes `NULL_AWARE_LEFT_ANTI_JOIN`
from right-side push-through.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]