Commit graph

24 commits

Author SHA1 Message Date
Alex Garcia
aab9b37de2 Add unit tests for distance functions (L2, cosine, hamming)
Add test-only wrappers behind SQLITE_VEC_TEST compile flag to expose
static distance functions for unit testing. Includes tests for
distance_l2_sqr_float (4 cases), distance_cosine_float (3 cases),
and distance_hamming (4 cases). Print active SIMD flags at test start.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 18:04:30 -08:00
Alex Garcia
0659d8848d Update test-unit.c and unittest.rs functions to enforce pre-existing behavior
- Expand sqlite-vec-internal.h with scanner/tokenizer types, vector column
  definition types, and parser function declarations
- Fix min_idx declaration to match actual C signature (add candidates,
  bTaken, k_used params)
- Compile test-unit with -DSQLITE_CORE and link vendor/sqlite3.c so
  sqlite3 API functions (sqlite3_strnicmp, sqlite3_mprintf, etc.) resolve
- Add unit tests for vec0_token_next, Vec0Scanner, and
  vec0_parse_vector_column
- Fix Rust build.rs to define SQLITE_CORE and compile vendor/sqlite3.c
- Fix Rust min_idx FFI signature and wrapper to match actual C function

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 17:46:11 -08:00
Alex Garcia
681f9028af --managed-python, fix flakey tests 2026-02-13 07:08:48 -08:00
Alex Garcia
0dd6827f31 uv directory fix 2026-02-13 06:52:51 -08:00
Alex Garcia
1cbe22c78b build fixes, uv for testing 2026-02-13 06:48:07 -08:00
Alex Garcia
352f953fc0
Metadata filtering (#124)
* initial pass at PARTITION KEY support.

* Initial pass, allow auxiliary columns on vec0 virtual tables

* update TODO

* Initial pass at metadata filtering

* unit tests

* gha this PR branch

* fixup tests

* doc internal

* fix tests, KNN/rowids in

* define SQLITE_INDEX_CONSTRAINT_OFFSET

* whoops

* update tests, syrupy, use uv

* un ignore pyproject.toml

* dot

* tests/

* type error?

* win: .exe, update error name

* try fix macos python, paren around expr?

* win bash?

* dbg :(

* explicit error

* op

* dbg win

* win ./tests/.venv/Scripts/python.exe

* block UPDATEs on partition key values for now

* test this branch

* accidentally removved "partition key type mistmatch" block during merge

* typo ugh

* bruv

* start aux snapshots

* drop aux shadow table on destroy

* enforce column types

* block WHERE constraints on auxiliary columns in KNN queries

* support delete

* support UPDATE on auxiliary columns

* test this PR

* dont inline that

* test-metadata.py

* memzero text buffer

* stress test

* more snpashot tests

* rm double/int32, just float/int64

* finish type checking

* long text support

* DELETE support

* UPDATE support

* fix snapshot names

* drop not-used in eqp

* small fixes

* boolean comparison handling

* ensure error is raised when long string constraint

* new version string for beta builds

* typo whoops

* ann-filtering-benchmark directory

* test-case

* updates

* fix aux column error when using non-default rowid values, needs test

* refactor some text knn filtering

* rowids blob read only on text metadata filters

* refactor

* add failing test causes for non eq text knn

* text knn NE

* test cases diff

* GT

* text knn GT/GE fixes

* text knn LT/LE

* clean

* vtab_in handling

* unblock aux failures for now

* guard sqlite3_vtab_in

* else in guard?

* fixes and tests

* add broken shadow table test

* rename _metadata_chunksNN shadown table to _metadatachunksNN, for proper shadowName detection

* _metadata_text_NN shadow tables to _metadatatextNN

* SQLITE_VEC_VERSION_MAJOR SQLITE_VEC_VERSION_MINOR and SQLITE_VEC_VERSION_PATCH in sqlite-vec.h

* _info shadow table

* forgot to update aux snapshot?

* fix aux tests
2024-11-20 00:59:34 -08:00
Alex Garcia
6658624172
PARTITION KEY support (#122)
* initial pass at PARTITION KEY support.

* unit tests

* gha this PR branch

* fixup tests

* doc internal

* fix tests, KNN/rowids in

* define SQLITE_INDEX_CONSTRAINT_OFFSET

* whoops

* update tests, syrupy, use uv

* un ignore pyproject.toml

* dot

* tests/

* type error?

* win: .exe, update error name

* try fix macos python, paren around expr?

* win bash?

* dbg :(

* explicit error

* op

* dbg win

* win ./tests/.venv/Scripts/python.exe

* block UPDATEs on partition key values for now
2024-11-20 00:02:04 -08:00
Alex Garcia
fa4770b84d typo fix 2024-09-05 21:26:42 -07:00
Tom Pollak
e78b7f155c
added make install / uninstall directives (#85)
Co-authored-by: Tom Pollak <tompollak100@gmail.com>
2024-08-14 19:24:43 -07:00
Alex Garcia
4296dbd0d1 -lm to CFLAGS for linux builds 2024-08-14 19:13:04 -07:00
Alex Garcia
a27153c107 -DSQLITE_VEC_STATIC in places 2024-08-09 10:45:39 -07:00
Alex Garcia
77b4f552f7 fix objs 2024-07-05 12:44:03 -07:00
Alex Garcia
6405aee37e fix static 2024-07-05 12:38:06 -07:00
Alex Garcia
4196f16b27 error handling on vec0 INSERT operations, introduce evidence-of 2024-06-23 17:46:42 -07:00
Daniel Levi-Minzi
2c382a4cb4
option to use brew sqlite in include and lib flag (#24) 2024-06-20 09:15:48 -07:00
Alex Garcia
163fc2db44 sqlite-vec.h dep on cli 2024-05-23 11:27:15 -07:00
Alex Garcia
79f4e15a63 windows make fix? 2024-05-23 11:21:38 -07:00
Alex Garcia
0af4e1eaed cosmocc support 2024-05-23 11:15:30 -07:00
Alex Garcia
12c96fc6fe site fix 2024-05-10 23:40:22 -07:00
Alex Garcia
a2c207347e start website 2024-05-10 20:49:47 -07:00
Alex Garcia
9ef6dec94a release scripts 2024-04-27 12:46:53 -07:00
Alex Garcia
a6b055ea39 make progress 2024-04-27 12:05:21 -07:00
Alex Garcia
e5b0f4c0c5 site: sitedir ensure dir 2024-04-20 17:18:48 -07:00
Alex Garcia
4c8ad629e0 Initial commit 2024-04-20 13:38:58 -07:00