Skip to content

fix: correct OR null semantics for nullable masks#5919

Merged
wjones127 merged 5 commits intolance-format:mainfrom
fenfeng9:fix/nullable-or-null-mask
Feb 11, 2026
Merged

fix: correct OR null semantics for nullable masks#5919
wjones127 merged 5 commits intolance-format:mainfrom
fenfeng9:fix/nullable-or-null-mask

Conversation

@fenfeng9
Copy link
Contributor

@fenfeng9 fenfeng9 commented Feb 9, 2026

closes #5895

Allow|Block OR previously assumed NULL rows were always included in the block.selected set; when they were not, NULLs could be dropped and FALSE/NULL were mixed, leading to incorrect results.

This change computes TRUE/FALSE/NULL explicitly for Allow|Block OR and derives NULL/selected sets from those.

@github-actions github-actions bot added bug Something isn't working python labels Feb 9, 2026
@codecov
Copy link

codecov bot commented Feb 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fenfeng9
Copy link
Contributor Author

Hi @wjones127, could you please review this when you have a moment? Thanks!

Copy link
Contributor

@wjones127 wjones127 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add this test to https://github.com/lance-format/lance/blob/main/rust/lance/tests/query/primitives.rs ? That's where we want these kind of query tests.

I didn't ask for this on the label list PRs because we don't yet have a nested field test suite merged. I've started them here: #5901

Should just be able to add a filter or two.

@wjones127 wjones127 self-assigned this Feb 10, 2026
@fenfeng9
Copy link
Contributor Author

Could you add this test to https://github.com/lance-format/lance/blob/main/rust/lance/tests/query/primitives.rs ? That's where we want these kind of query tests.

I didn't ask for this on the label list PRs because we don't yet have a nested field test suite merged. I've started them here: #5901

Should just be able to add a filter or two.

Sure, I'll handle this tomorrow. Should I keep the test in Python?

@wjones127
Copy link
Contributor

Could you add this test to https://github.com/lance-format/lance/blob/main/rust/lance/tests/query/primitives.rs ? That's where we want these kind of query tests.
I didn't ask for this on the label list PRs because we don't yet have a nested field test suite merged. I've started them here: #5901
Should just be able to add a filter or two.

Sure, I'll handle this tomorrow. Should I keep the test in Python?

You can if you want.

@fenfeng9 fenfeng9 force-pushed the fix/nullable-or-null-mask branch from 074a65e to 114fe5e Compare February 11, 2026 09:55
@fenfeng9 fenfeng9 requested a review from wjones127 February 11, 2026 13:06
Copy link
Contributor

@wjones127 wjones127 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thank you!

@wjones127 wjones127 merged commit 3d7fb36 into lance-format:main Feb 11, 2026
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] BTREE index incorrect row count on OR predicate with NULLs

2 participants

Comments