Skip to content

fix(index): exclude deleted rows from whole-fragment stable ID translation - #11274

Open
ddupg wants to merge 1 commit into
lance-format:mainfrom
ddupg:fix/stable-row-id-full-selection
Open

ddupg wants to merge 1 commit into
lance-format:mainfrom
ddupg:fix/stable-row-id-full-selection

Conversation

@ddupg

@ddupg ddupg commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Deleting a row leaves its stable ID in the fragment’s row ID sequence. When a scalar index selects the whole fragment, address-to-ID translation copies that sequence and includes the deleted row. Selecting the same physical offsets individually already skips it (#7918).

Apply the fragment’s deletion vector before adding its IDs to the result. With no deletions, the existing range-based conversion is unchanged. With deletions, only the deleted offsets need individual translation.

The regression test deletes ID 7 from a fragment containing IDs 5–9. On main, whole-fragment translation returned [5, 6, 7, 8, 9]. With this change, both selection forms returned [5, 6, 8, 9].

cargo fmt --all and Clippy for the lance crate (library and tests) passed. Workspace Clippy on macOS arm64 stops on existing unreachable expressions in byte_stream_split.rs (lines 358 and 393).

Extracted from #11273.

@github-actions github-actions Bot added the bug Something isn't working label Nov 19, 2026
@ddupg
ddupg force-pushed the fix/stable-row-id-full-selection branch from 4c79bdc to be14f1c Compare November 20, 2026 01:05
@ddupg
ddupg marked this pull request as ready for review November 20, 2026 01:06

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

@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 fix restores consistent live-row semantics, and the regression covers both selection forms after deletion.

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant