Skip to content

fix(index): prune stale index coverage during rebase - #8011

Draft
ddupg wants to merge 1 commit into
lance-format:mainfrom
ddupg:fix/prune-stale-index-coverage-on-rebase
Draft

fix(index): prune stale index coverage during rebase#8011
ddupg wants to merge 1 commit into
lance-format:mainfrom
ddupg:fix/prune-stale-index-coverage-on-rebase

Conversation

@ddupg

@ddupg ddupg commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

An index can be built from an old dataset handle. If the indexed column is rewritten before the index is committed, the old index may still claim that fragment and return wrong rows.

When the dataset has changed during the commit, this PR checks each new index against the latest data. Fragments whose indexed columns changed are removed from the index coverage, so queries scan those fragments instead.

The fix applies to all index types. RTree is only used for the end-to-end regression test.

Tests

  • Commit an RTree segment from a stale dataset handle after RewriteColumns.
  • Verify only the index on the changed column loses coverage.
  • Focused Rust and Python tests, Clippy, Rust format, and Ruff.

Related

Follow-up to the stale index coverage problem found in the review of #7884.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: QUIET

Plan: Pro Plus

Run ID: 2a9850ee-dae0-4dad-ad57-dca0f92a2308

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added A-python Python bindings bug Something isn't working labels Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-python Python bindings bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant