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: use selection vector to ensure ids are ordered #2956

Merged
merged 3 commits into from
Jan 27, 2022

Conversation

lokax
Copy link
Contributor

@lokax lokax commented Jan 20, 2022

static idx_t SortSelectionVector(SelectionVector &sel, idx_t count, row_t *ids)
SortSelectionVector does not actually sort ids, but ensures that ids are ordered through SelectionVector

The algorithm in CheckForConflicts needs to traverse the ids in order, which requires a SelectionVector to guarantee.

@Mytherin
Copy link
Collaborator

Thanks for the PR!

Looks good and seems correct, but do you have an example/could you add a test that triggers the bug in the original code and works with this change?

@Mytherin Mytherin merged commit 729c063 into duckdb:master Jan 27, 2022
@Mytherin
Copy link
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants