morrySnow opened a new pull request, #65110:
URL: https://github.com/apache/doris/pull/65110
### What problem does this PR solve?
Related PR: #23833
Problem Summary: ConvertOuterJoinToAntiJoin only allowed conversion when the
null-supplying side slot tested by IS NULL was non-nullable. This missed valid
cases where the slot is nullable but appears in a null-rejecting binary
comparison between left and right join slots, because a NULL value cannot
satisfy those join predicates. The fix records slots from non-null-safe
comparison predicates between join children, matches child slots to the
corresponding outer join output slots, and permits conversion for those
null-rejected nullable slots while keeping <=> excluded.
### Release note
None
### Check List (For Author)
- Test:
- Unit Test: ./run-fe-ut.sh --run
org.apache.doris.nereids.rules.rewrite.ConvertOuterJoinToAntiJoinTest
- Regression test: ./run-regression-test.sh --run -d nereids_syntax_p0
-s transform_outer_join_to_anti
- FE Checkstyle: mvn checkstyle:check -pl fe-core
- Behavior changed: Yes. The optimizer can now convert eligible outer joins
with nullable null-supplying slots to anti joins when the slot is null-rejected
by a non-null-safe binary comparison join condition.
- Does this need documentation: No
--
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]