Repository navigation
feat(index): support bounded optimize for LabelList - #10954
Merged
Xuanwo merged 3 commits intoNov 15, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
✅ Gate recommendation: approve.
The existing planner and segment merger provide a focused solution for bounded LabelList maintenance. I found no blocking issues with fragment packing, identifier domains, null and deletion handling, or overlay masking.
Xuanwo
approved these changes
Nov 15, 2026
This was referenced Nov 16, 2026
Xuanwo
pushed a commit
that referenced
this pull request
Nov 30, 2026
…11231) Part of #10847. Follow-up to #10954. #10954 added bounded optimize for LabelList and kept existing segments in the merge stage, even when a merge group had only one build task. This PR lets a lone build task merge the selected old segments with new rows and write the final segment directly. That saves an intermediate index write and a separate merge pass. The merge applies each source segment's filter to both label postings and list-level NULLs. Incompatible legacy segments use the existing rebuild path. Tests cover single-task and multi-task plans, partial deletions, and overlay updates. The single-task regression also checks that the task reads the new fragment's data files without rescanning the old fragments' data files.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Related to #10847.
LabelList currently plans all unindexed fragments as one optimize task, even when
max_rows_per_taskormax_rows_per_segmentis set. This adds LabelList to the existing bounded planner so build tasks and output segments follow its fragment packing.Old LabelList segments stay in the merge stage, including when there is only one build task. The planner checks every sibling's writer-domain version and keeps incompatible groups on the existing single-task path. Merges clean deleted addresses, including partial deletions on still-live fragments, from value postings and list-null rows. Bounded merges preserve overlay masking: stale overlaid rows stay excluded from index results and are re-evaluated against the current values.
Testing on the integrated tree:
cargo test -p lance --test integration_tests label_list_optimize --profile ci --locked: 12 passed.cargo test -p lance --lib dataset_overlay_index_masking::test_label_list --profile ci --locked: 2 passed, including the bounded-merge overlay-masking regression.cargo check --workspace --tests --benches --profile ci --locked: passed.cargo clippy --all --tests --benches --profile ci --locked -- -D warnings: passed.cargo fmt --all -- --check: passed.cd java && ./mvnw spotless:check: passed.