Commit graph

2 commits

Author SHA1 Message Date
Rolf Rando
8105eee61e
Skip _vector_chunks rename for non-FLAT vec0 columns (#294)
vec0Rename emits an unconditional ALTER TABLE on `<name>_vector_chunks%02d`
for every vector column, but non-FLAT columns (rescore, IVF, DiskANN) don't
create that shadow table — so ALTER TABLE RENAME on a DiskANN-indexed (or
rescore/IVF) vec0 table fails with `no such table` and leaves any cached
prepared statements still referencing the old name.

Mirror the guard already used at create time in vec0_init around
VEC0_SHADOW_VECTOR_N_CREATE: only rename `_vector_chunks` when the column's
index_type is VEC0_INDEX_TYPE_FLAT.

Adds a regression test exercising rename on a DiskANN-indexed table.
2026-05-17 22:56:52 -07:00
Alex Garcia
c5607100ab Implement xRename for vec0 virtual table (fixes #43)
Enables ALTER TABLE RENAME on vec0 tables by renaming all shadow tables
(info, rowids, chunks, auxiliary, vector_chunks, metadata, rescore,
diskann, ivf) and updating cached names and prepared statements.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 23:01:29 -07:00