mrhhsg opened a new pull request, #69762:
URL: https://github.com/apache/doris/pull/69762
### What problem does this PR solve?
Issue Number: N/A
Related PR: N/A
Problem Summary: In a null-aware mark join with an additional join
predicate, real build candidates receive a null flag, but the no-match sentinel
did not. A reused probe buffer can retain a null flag from a previous NULL-key
probe, causing a correlated `IN` over an empty result to return `NULL` instead
of `FALSE`. Initialize the sentinel flag to zero when it is emitted, while
preserving the flags of real candidates. Add a focused hash-table unit test and
an ordered SQL regression covering correlated `IN` and `NOT IN`.
### Release note
Fix incorrect NULL results for correlated IN/NOT IN when the correlated
subquery is empty after a nullable probe.
### Check List (For Author)
- Test
- [x] Regression test: `mark_join_correlated_empty` passed against an
isolated local ASAN FE/BE cluster, including a final rerun against generated
expected output.
- [x] Unit Test:
`JoinHashTableTest.NullAwareOtherConjunctSentinelResetsNullFlag` passed.
- [ ] Manual test
- [ ] No need to test or manual test
- Build and style: ASAN BE/FE build (including FE checkstyle), BE header
hygiene, clang-format, check-format, and diff whitespace check passed.
- Clang-tidy: attempted but did not pass locally.
- Behavior changed:
- [x] Yes. Empty correlated `IN` returns `FALSE` and `NOT IN` returns
`TRUE` for this join path, independent of the previous probe row.
- Does this need documentation?
- [x] No.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label if needed
--
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]