Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle deletions in take #3360

Merged
merged 5 commits into from
Jan 9, 2025

Conversation

wjones127
Copy link
Contributor

We were not properly handling deletions when mapping raw offsets to row addresses. This PR makes sure we use the deletion files to figure out the exact row addresses.

Fixes #3332

@github-actions github-actions bot added the bug Something isn't working label Jan 8, 2025
@wjones127 wjones127 marked this pull request as ready for review January 8, 2025 17:44
}
}

pub fn map_offset(&mut self, offset: u32) -> u32 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see we also have a judgment in fragement.rs here (but missed the judgment of discrete offset). Can we find one way to converge these judgments into one place?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could probably re-implement that other function in terms of this one, if we wanted. Though not sure if it is worth while.

Copy link
Collaborator

@yanghua yanghua left a comment

Choose a reason for hiding this comment

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

LGTM

@wjones127 wjones127 merged commit 64adfea into lancedb:main Jan 9, 2025
26 checks passed
@wjones127 wjones127 deleted the fix/take-with-deletions branch January 9, 2025 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can take API skip deleted rows?
2 participants