Skip to content

SLQC doesn't support vectors for MYSQL #3732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mcgold1 opened this issue Dec 2, 2024 · 2 comments · Fixed by #3733 or #3734
Closed

SLQC doesn't support vectors for MYSQL #3732

mcgold1 opened this issue Dec 2, 2024 · 2 comments · Fixed by #3733 or #3734
Assignees
Labels
📚 mysql enhancement New feature or request

Comments

@mcgold1
Copy link

mcgold1 commented Dec 2, 2024

Version

1.27.0

What happened?

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

CREATE TABLE t1(
    id INT PRIMARY 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') LIMIT 10;

Configuration

No response

Playground URL

No response

What operating system are you using?

No response

What database engines are you using?

No response

What type of code are you generating?

No response

@mcgold1 mcgold1 added the bug Something isn't working label Dec 2, 2024
@dosubot dosubot bot added the 📚 mysql label Dec 2, 2024
@kyleconroy
Copy link
Collaborator

Could you please include an example schema and query? I'm not familiar with the new vector type.

@kyleconroy kyleconroy self-assigned this Dec 3, 2024
@kyleconroy kyleconroy reopened this Dec 3, 2024
@kyleconroy kyleconroy added enhancement New feature or request and removed bug Something isn't working labels Dec 3, 2024
@mcgold1
Copy link
Author

mcgold1 commented 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 mysql enhancement New feature or request
Projects
None yet
2 participants