-
Notifications
You must be signed in to change notification settings - Fork 728
fix: handle logical rows deletion properly for zonemap and bloomfilter #5140
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
Merged
wjones127
merged 7 commits into
lance-format:main
from
HaochengLIU:4758-fix-zonemap-deletion-handle
Nov 19, 2025
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a28f159
fix: Make zonemap handle deletion properly
HaochengLIU ad300de
add a python test
HaochengLIU bac5a00
fix bloom filter as well
HaochengLIU d8b6d26
Address first round of PR review
HaochengLIU 88ecb64
revert the types for zonemap and bloomfilter stats
HaochengLIU edf263f
Delete rust/debug.output
HaochengLIU b41d03e
add another test
wjones127 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| diff --git a/Cargo.lock b/Cargo.lock | ||
| index 71561804..b050dca3 100644 | ||
| --- a/Cargo.lock | ||
| +++ b/Cargo.lock | ||
| @@ -4661,6 +4661,7 @@ dependencies = [ | ||
| "itertools 0.13.0", | ||
| "jieba-rs", | ||
| "jsonb", | ||
| + "lance", | ||
| "lance-arrow", | ||
| "lance-core", | ||
| "lance-datafusion", | ||
| diff --git a/rust/lance-index/src/scalar/zonemap.rs b/rust/lance-index/src/scalar/zonemap.rs | ||
| index 0a746d0e..2e8a3852 100644 | ||
| --- a/rust/lance-index/src/scalar/zonemap.rs | ||
| +++ b/rust/lance-index/src/scalar/zonemap.rs | ||
| @@ -546,6 +546,10 @@ impl ScalarIndex for ZoneMapIndex { | ||
| // Row addresses are: (fragment_id << 32) + zone_start | ||
| let zone_start_addr = (zone.fragment_id << 32) + zone.zone_start; | ||
| let zone_end_addr = zone_start_addr + (zone.zone_length as u64); | ||
| + println!( | ||
| + "found a match! zone_start_addr: {}, zone_end_addr: {}", | ||
| + zone_start_addr, zone_end_addr | ||
| + ); | ||
|
|
||
| // Add all row addresses in this zone to the result | ||
| row_id_tree_map.insert_range(zone_start_addr..zone_end_addr); | ||
| @@ -763,6 +767,7 @@ impl ZoneMapIndexBuilder { | ||
| chunk_concat_stream(batches_source, self.options.rows_per_zone as usize); | ||
|
|
||
| while let Some(batch) = batches_source.try_next().await? { | ||
| + println!("incoming data is {:?}", batch); | ||
| if batch.num_rows() == 0 { | ||
| continue; | ||
| } | ||
| @@ -831,6 +836,7 @@ impl ZoneMapIndexBuilder { | ||
| if self.cur_zone_offset > 0 { | ||
| self.new_map(self.cur_fragment_id)?; | ||
| } | ||
| + println!("after training, the zone_maps are {:?}", self.maps); | ||
|
|
||
| Ok(()) | ||
| } | ||
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.
Drop this file?