Skip to content

feat(index): support bounded optimize for LabelList - #10954

Merged
Xuanwo merged 3 commits into
lance-format:mainfrom
Epochex:feat/label-list-bounded-optimize
Nov 15, 2026
Merged

Xuanwo merged 3 commits into
lance-format:mainfrom
Epochex:feat/label-list-bounded-optimize

Conversation

@Epochex

@Epochex Epochex commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Related to #10847.

LabelList currently plans all unindexed fragments as one optimize task, even when max_rows_per_task or max_rows_per_segment is 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.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@github-actions github-actions Bot added A-java Java bindings + JNI enhancement New feature or request labels Nov 11, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 11, 2026
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 15, 2026

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ 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.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 15, 2026
@Xuanwo
Xuanwo merged commit 95b24dc into lance-format:main Nov 15, 2026
43 of 45 checks passed
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-java Java bindings + JNI enhancement New feature or request K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants