Repository navigation
Fix bit order in vec_each - #323
Open
ariannamethod wants to merge 1 commit into
Open
ariannamethod wants to merge 1 commit into
ariannamethod wants to merge 1 commit into
Conversation
vlasky
added a commit
to vlasky/sqlite-vec
that referenced
this pull request
Nov 8, 2026
…olumn types Ports, as they stand, three open pull requests against asg017/sqlite-vec whose bugs reproduce on this fork: - asg017#323 by ariannamethod: vec_each() read bit vectors most significant bit first, while vec_to_json(), vec_quantize_binary() and the stored bitmaps are least significant bit first. The API reference example showed the wrong order too. - asg017#365 by flysheep-ai (upstream issue asg017#362): vec_distance_l1() on int8 vectors summed in 32 bits and wrapped negative from 8,421,505 elements at opposite extremes. The sum is now 64-bit and the NEON kernel is only used within its 32-bit range. vec0 columns are capped at 8192 dimensions and were never affected. - asg017#310 by stumpylog: vector column types were matched by prefix, so float16[4], floaty[4] and bitcoin[8] were accepted as float and bit columns. The name must now match exactly; float32 stays accepted. Two tests declared a column as float8[1] and now say float[1]. Tests for the first two follow with the fork's own fixes.
|
For anyone waiting on this: the community fork vlasky/sqlite-vec has merged this change as is in v0.2.9-alpha (changelog). vec_each() now reads bit vectors least significant bit first, matching vec_to_json() and vec_quantize_binary(), and the API reference example is corrected. Thanks for the fix. |
Author
|
@vlasky Thanks for merging our fix into your fork and letting know! |
This branch has not been deployed
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.
Read bits least-significant first, matching vec_to_json() and vec_quantize_binary().
Adds two regression cases and corrects the API example. Both cases fail before the fix.
Testing: pytest -q tests/test-loadable.py — 43 passed, 4 skipped.