You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a bug, an error should be thrown because not null is not supported in vec0 constructors yet.
Removing that should enforce primary keys:
create virtual table text_pk using vec0(
pk textprimary key,
embedding float[3],
);
insert or replace into text_pk (pk, embedding) values ('a', '[1, 2, 3]');
insert or replace into text_pk (pk, embedding) values ('a', '[4, 5, 6]'); -- Runtime error: UNIQUE constraint failed on text_pk primary key
Though also keep in mind, insert or replace into is quite supported in vec0 virtual tables yet, see #127
So there are two bugs, one for incorrect parsing of primary keys when not null is defined, and a second one for upserts. I'll try to fix both this week!
With this input:
I expected one row with pk 'a' and embedding '[4, 5, 6]', but got:
Is this a bug?
The text was updated successfully, but these errors were encountered: