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

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: None
   
   Problem Summary: Correlated `NOT IN` subqueries under disjunction can be 
rewritten to a mark null-aware left anti join with additional join conjuncts. 
When the probe join key is `NULL`, the hash table lookup advanced the probe 
index before the caller could run the null-probe handling path. As a result, 
the probe row was skipped before the mark column was evaluated by the outer 
disjunction, producing incomplete query results. This change keeps the probe 
index on the `NULL` row so the null-aware join path can emit the correct mark 
value.
   
   ### Release note
   
   Fix incorrect results for correlated `NOT IN` subqueries combined with 
disjunctions.
   
   ### Check List (For Author)
   
   - Test:
       - Regression test: `doris-local-regression.sh --network 10.26.20.3/24 
run -d correctness -s test_subquery_in_disjunction -forceGenOut`
       - Regression test: `doris-local-regression.sh --network 10.26.20.3/24 
run -d correctness -s test_subquery_in_disjunction`
       - Manual test: verified the `NOT IN` + `OR` reproducer before and after 
the fix on a local FE/BE cluster
       - Build: `./build.sh --be`
   - Behavior changed: Yes. Corrects query result semantics for affected 
null-aware mark anti joins.
   - 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]

Reply via email to