mirror of
https://github.com/asg017/sqlite-vec.git
synced 2026-04-25 00:36:56 +02:00
Replace the old INSERT INTO t(rowid) VALUES('command') hack with a
proper hidden command column named after the table (FTS5 pattern):
INSERT INTO t(t) VALUES ('oversample=16')
The command column is the first hidden column (before distance and k)
to reserve ability for future table-valued function argument use.
Schema: CREATE TABLE x(rowid, <cols>, "<table>" hidden, distance hidden, k hidden)
For backwards compat, pre-v0.1.10 tables (detected via _info shadow
table version) skip the command column to avoid name conflicts with
user columns that may share the table's name. Verified with legacy
fixture DB generated by sqlite-vec v0.1.6.
Changes:
- Add hidden command column to sqlite3_declare_vtab for new tables
- Version-gate via _info shadow table for existing tables
- Validate at CREATE time that no column name matches table name
- Add rescore_handle_command() with oversample=N support
- rescore_knn() prefers runtime oversample_search over CREATE default
- Remove old rowid-based command dispatch
- Migrate all DiskANN/IVF/fuzz tests and benchmarks to new syntax
- Add legacy DB fixture (v0.1.6) and 9 backwards-compat tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| corpus | ||
| targets | ||
| .gitignore | ||
| diskann-blob-truncate.c | ||
| diskann-buffer-flush.c | ||
| diskann-command-inject.c | ||
| diskann-create.c | ||
| diskann-deep-search.c | ||
| diskann-delete-stress.c | ||
| diskann-graph-corrupt.c | ||
| diskann-int8-quant.c | ||
| diskann-operations.c | ||
| diskann-prune-direct.c | ||
| diskann.dict | ||
| exec.c | ||
| exec.dict | ||
| ivf-cell-overflow.c | ||
| ivf-create.c | ||
| ivf-create.dict | ||
| ivf-kmeans.c | ||
| ivf-knn-deep.c | ||
| ivf-operations.c | ||
| ivf-quantize.c | ||
| ivf-rescore.c | ||
| ivf-shadow-corrupt.c | ||
| json.c | ||
| Makefile | ||
| metadata-columns.c | ||
| numpy.dict | ||
| README.md | ||
| rescore-create.c | ||
| rescore-create.dict | ||
| rescore-interleave.c | ||
| rescore-knn-deep.c | ||
| rescore-operations.c | ||
| rescore-quantize-edge.c | ||
| rescore-quantize.c | ||
| rescore-shadow-corrupt.c | ||
| scalar-functions.c | ||
| scalar-functions.dict | ||
| shadow-corrupt.c | ||
| TODO.md | ||
| vec-each.c | ||
| vec-mismatch.c | ||
| vec0-create-full.c | ||
| vec0-create.c | ||
| vec0-create.dict | ||
| vec0-delete-completeness.c | ||
| vec0-operations.c | ||
ASAN_OPTIONS=detect_leaks=1 ./targets/vec0_create \
-dict=./vec0-create.dict -max_total_time=5 \
./corpus/vec0-create
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
LDFLAGS="-L/opt/homebrew/opt/llvm/lib/c++ -Wl,-rpath,/opt/homebrew/opt/llvm/lib/c++"