dolthub / vitess

Vitess is a database clustering system for horizontal scaling of MySQL.
http://vitess.io
Apache License 2.0
23 stars 22 forks source link

Support VECTOR(N) type parsing #376

Open NewtonVan opened 1 week ago

NewtonVan commented 1 week ago

Feature Description

Although #365 provides a solution for parsing vector types, it deviates from the syntax specifications of MySQL. Currently, we would like to focus on supporting the very basic syntax parsing for MySQL 9.0 vector types first. I’d also be interested in hearing @jycor and @nicktobey thoughts on this approach.

Use Case(s)

CREATE TABLE t(id int, rgb vector(3));
nicktobey commented 1 week ago

Hey there, thanks for asking about this.

We're currently following the syntax specification used by MariaDB, which is an alternate implementation of the MySQL dialect.

When we began this project, MySQL 9.0 had not yet been released. Even now, the MySQL syntax still lacks support for things like vector indexes, which we think are a critical component for a vector database. It's so critical that we decided to implement it first, as you can see in the linked PR.

Adding an explicit vector datatype is on our roadmap, and it looks like both the MariaDB spec and the MySQL spec use the same syntax for the datatype. So once this datatype is added, it should conform to the MySQL spec.