BiteTheDDDDt opened a new pull request, #64102:
URL: https://github.com/apache/doris/pull/64102

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: None
   
   Problem Summary:
   
   Runtime filters from a parent inner join could be pushed through an outer 
join into the null-generating child even when the probe expression was not 
null-propagating for that child.
   
   For example, with `a LEFT JOIN b ON a.pk = b.pk` followed by an inner join 
on `coalesce(b.pk, 0) = c.pk`, pre-filtering `b` before the left join can 
change a matched row into a null-extended row. The parent join can then match 
that row through `coalesce(NULL, 0)`, producing wrong results.
   
   This PR blocks runtime filter pushdown through an outer join's 
null-generating child unless the probe expression preserves NULL semantics for 
slots from that child. Normal pushdown through preserved sides and 
null-propagating expressions is kept unchanged.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [ ] Regression test
       - [x] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason <!-- Add your reason?  -->
   
   Added regression case:
   
   
`regression-test/suites/correctness_p0/test_runtime_filter_outer_join_nullable_side.groovy`
   
   Unit test:
   
   `./run-fe-ut.sh --run 
org.apache.doris.nereids.postprocess.RuntimeFilterTest#testDoNotPushDownNonNullPropagatingRuntimeFilterThroughOuterJoin`
   
   The SQL regression case was not run locally against the available 9333 
cluster because that cluster was the unpatched repro cluster.
   
   - Behavior changed:
       - [ ] No.
       - [x] Yes. Runtime filters are no longer pushed through an outer join 
into its null-generating child when the probe expression can convert NULL to a 
non-NULL value.
   
   - Does this need documentation?
       - [x] No.
       - [ ] Yes. <!-- Add document PR link here. eg: 
https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should 
merge into -->
   


-- 
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]

Reply via email to