Repository navigation
[core] Negate predicates like Java so NULL rows stay excluded #1145
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
Open
JeonDaehong
wants to merge
14
commits into
apache:main
Choose a base branch
from
JeonDaehong:fix-negate-null
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,640
−127
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
0fe05d6
[core] Negate predicates like Java so NULL rows stay excluded
JeonDaehong 764a3ec
[core] Keep NaN rows under negation and refine floating bitmap candid…
JeonDaehong 3713e6f
[core] Keep exact BTree answers for floating filters
JeonDaehong 705fdbd
[core] Guard nested negation and skip pruned bitmap entries in exactness
JeonDaehong 6be7c91
[core] Decide bitmap exactness from shards that survive pruning
JeonDaehong d962f56
[core] Push NOT down to the leaves before evaluating it
JeonDaehong 0244b0d
[core] Count a bitmap shard as inexact only when it returns rows
JeonDaehong c0bde05
[core] Keep bitmap candidates as row ranges so exactness follows the …
JeonDaehong 2f11ddb
Merge remote-tracking branch 'up/main' into fix-negate-null
JeonDaehong 92e4758
[core] Keep exact index hits when candidate rows are excluded or refined
JeonDaehong 725ded0
Merge remote-tracking branch 'origin/main' into neg
JeonDaehong e774bb8
[core] Keep exact OR matches when another arm returns candidates
JeonDaehong 8d30fad
[core] Keep NULL semantics under NOT for missing fields and subtract …
JeonDaehong 18b3f28
[core] Keep BTree hits when a bitmap covers the same rows
JeonDaehong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
[P2] Preserve NULL semantics when a Mosaic file physically omits the field
The new guard excludes a stored NULL for
NOT starts_with(name, 'a'). A same-schema Mosaic file may omit that logical field physically. Mosaic remaps against the columns actually stored, andremap_predicateinarrow/filtering.rsfolds the missing positive leaf toAlwaysFalseand then flips the retainedNottoAlwaysTrue. The guard never sees it.I reproduced this with the existing sparse Mosaic fixture, a nullable logical
new_namecolumn absent from the file, andPredicate::negate(starts_with("new_name", "a")). The reader returned all six fixture IDs[1, 2, 10, 11, 20, 21]. Since the omitted field is NULL for all rows, the expected result is empty.Please apply the NULL-aware negation rule before missing fields are folded into constants, and add a sparse-file regression for a leaf retained under
Not.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.
Thanks, reproduced it with the sparse fixture.
remap_predicatenow pushes the NOT down before folding missing fields, so a missing leaf under NOT becomesAlwaysFalse(IS NULL / IS NOT NULL still flip). Addedtest_read_predicate_missing_column_under_not_stays_null, which returns all six ids before the fix.