Skip to content

refactor: consolidate logic between zonemap and bloomfilter indexes#5374

Merged
HaochengLIU merged 12 commits intolance-format:mainfrom
fenfeng9:refactor/zonemap-bloomfilter
Dec 8, 2025
Merged

refactor: consolidate logic between zonemap and bloomfilter indexes#5374
HaochengLIU merged 12 commits intolance-format:mainfrom
fenfeng9:refactor/zonemap-bloomfilter

Conversation

@fenfeng9
Copy link
Copy Markdown
Contributor

@fenfeng9 fenfeng9 commented Dec 1, 2025

Closes #5230

Background

ZoneMap and BloomFilter indexes both needed zone training and search capabilities, so this PR factors those shared pieces into a common module that the two indexes now reuse.

Changes

  • add scalar::zoned with a shared trainer (ZoneTrainer/ZoneProcessor), ZoneBound, search_zones, and rebuild_zones
  • migrate the zonemap index to the shared infrastructure so training, updating, and searching all use the common logic
  • migrate the bloomfilter index the same way to remove duplicated state and ensure consistent row-range handling

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@fenfeng9
Copy link
Copy Markdown
Contributor Author

fenfeng9 commented Dec 1, 2025

Hi @HaochengLIU, sorry for the delay—could you take a look at the PR when you have a chance? It consolidates the shared zone logic between ZoneMap and BloomFilter. Happy to address any feedback, thanks!

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 1, 2025

Codecov Report

❌ Patch coverage is 85.90164% with 129 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
rust/lance-index/src/scalar/bloomfilter.rs 62.93% 74 Missing and 12 partials ⚠️
rust/lance-index/src/scalar/zoned.rs 95.85% 12 Missing and 10 partials ⚠️
rust/lance-index/src/scalar/zonemap.rs 86.18% 10 Missing and 11 partials ⚠️

📢 Thoughts on this report? Let us know!

@HaochengLIU HaochengLIU self-requested a review December 4, 2025 00:59
@HaochengLIU
Copy link
Copy Markdown
Member

@fenfeng9 finish the first round of review

Comment thread rust/lance-index/src/scalar/bloomfilter.rs Outdated
Comment thread rust/lance-index/src/scalar/zonemap.rs Outdated
Comment thread rust/lance-index/src/scalar/zoned.rs Outdated
Comment thread rust/lance-index/src/scalar/zoned.rs Outdated
Comment thread rust/lance-index/src/scalar/zoned.rs Outdated
Comment thread rust/lance-index/src/scalar/zoned.rs Outdated
@fenfeng9
Copy link
Copy Markdown
Contributor Author

fenfeng9 commented Dec 5, 2025

Thanks for the feedback.I'll address these comments and fix the conflicts tomorrow.

@fenfeng9 fenfeng9 force-pushed the refactor/zonemap-bloomfilter branch from fa7c2c5 to f5dbf47 Compare December 6, 2025 13:20
@HaochengLIU
Copy link
Copy Markdown
Member

The PR lgtm. Once all tests pass I'll merge it. Thanks for the contribution! @fenfeng9

@HaochengLIU HaochengLIU merged commit 9672cfe into lance-format:main Dec 8, 2025
27 checks passed
jackye1995 pushed a commit to jackye1995/lance that referenced this pull request Jan 21, 2026
…ance-format#5374)

Closes lance-format#5230

#### Background
ZoneMap and BloomFilter indexes both needed zone training and search
capabilities, so this PR factors those shared pieces into a common
module that the two indexes now reuse.

#### Changes
- add `scalar::zoned` with a shared trainer
(`ZoneTrainer`/`ZoneProcessor`), `ZoneBound`, `search_zones`, and
`rebuild_zones`
- migrate the zonemap index to the shared infrastructure so training,
updating, and searching all use the common logic
- migrate the bloomfilter index the same way to remove duplicated state
and ensure consistent row-range handling

---------

Co-authored-by: Haocheng Liu <30446009+HaochengLIU@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consolidate the logic between ZoneMap and BloomFilters indexes

2 participants