-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](topn) fix AcceptNullPredicate adding back all null rows instead of only those in original bitmap #60537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… of only those in original bitmap
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
TPC-H: Total hot run time: 31091 ms |
ClickBench: Total hot run time: 28.3 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
airborne12
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
HappenLee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
… of only those in original bitmap (#60537)
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Issue: AcceptNullPredicate::evaluate incorrectly adds back all NULL rows instead of only those in the original bitmap.
Root Cause: When multiple predicates are chained, the bitmap gets progressively filtered. The original code did bitmap |= null_bitmap after nested evaluation, which added back ALL NULL rows, including those already filtered out by previous predicates.
Example:
Original bitmap (after previous predicates): {0, 1, 2, 5, 6}
NULL rows in this column: {2, 3, 7}
Nested predicate result: {0, 1, 5}
Before fix: bitmap = {0, 1, 2, 3, 5, 7} ← Wrong! 3, 7 should not appear
After fix: bitmap = {0, 1, 2, 5} ← Correct! Only NULL row 2 added back
Fix: Capture bitmap & null_bitmap BEFORE nested evaluation, then add back only those NULL rows after.
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)