Repository navigation
Delete the requested rows when ANN ids are a NumPy array - #1303
Merged
Merged
Conversation
Member
|
Please sync your fork and merge in tests into the new structure. |
kartsan03
force-pushed
the
fix/ann-delete-numpy-ids
branch
2 times, most recently
from
September 30, 2026 15:26
5bc0933 to
6765330
Compare
Contributor
Author
|
Done. I rebased onto master (6765330) and moved the tests into the new layout, so the
The 4 tests pass on the branch. With the source files from master they fail: Milvus and Zvec raise |
Member
|
LGTM - Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Deleting from a dense ANN directly with ids in a NumPy array removed the wrong rows in SQLite:
sqlite3binds NumPy integers as blobs, sodelete(np.array([3, 4]))deleted row 0 and kept rows 3 and 4. PGVector deleted nothing for the same call, and Milvus and Zvec raisedValueErrorfrom theirif ids:guard.Bind ids as
intin the SQLite and PGVector deletes, and checklen(ids)in the Milvus and Zvec guards, following #1241. Add one regression method inTestDensethat deletes with a NumPy array in the four backends and checks the count and which ids search still returns.Fixes #1302.
Validation
ValueError, SQLite ends with 9 rows and PGVector with 10 where 8 are expected. It passes after the fix.testann.testdenseandtestann.testsparse: 58 tests pass.