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
Mysql added vector columns in MySQL 9.0. When trying to use SQLC with a vector column in the parser doesn't recognize it and throws a syntax error.
Relevant log output
No response
Database schema
CREATETABLEt1(
id INTPRIMARY KEY auto_increment,
embedding VECTOR(4)
);
SQL queries
INSERT INTO t1(embedding) VALUES (STRING_TO_VECTOR('[0.1, 0.2, 0.3, 0.4]'));
SELECT id FROM t1 ORDER BY DISTANCE(STRING_TO_VECTOR('[1.2, 3.4, 5.6]'), embedding, 'L2_squared') LIMIT10;
Activity
kyleconroy commentedon Dec 3, 2024
Could you please include an example schema and query? I'm not familiar with the new vector type.
mcgold1 commentedon Dec 3, 2024
@kyleconroy Added an example schema and a couple of query examples. Additionally here's the MySQL 9.1 vector function doc page which may come in handy: https://dev.mysql.com/doc/refman/9.1/en/vector-functions.html.