Closed dbussink closed 1 month ago
Recent changes introduce a new contributor, Dirkjan Bussink, and expand the fieldType
enum with new types: fieldTypeVector
, fieldTypeInvalid
, and fieldTypeBool
. The code handling these field types in fields.go
and packets.go
has been updated to support fieldTypeVector
. This addition enables the handling of vector data types within the impacted functions.
Files | Summary of Changes |
---|---|
AUTHORS |
Added Dirkjan Bussink as a new contributor with the email d.bussink@gmail.com . |
const.go |
Added fieldTypeVector , fieldTypeInvalid , fieldTypeBool to the fieldType enum. |
fields.go |
Included fieldTypeVector in typeDatabaseName and scanType method cases. |
packets.go |
Added fieldTypeVector handling in the readRow function within binaryRows . |
A new contributor joins the scene,
With vectors added to the field routine.
From types to rows, the code extends,
As Dirkjan’s magic now wends.
Handling data with a vector's grace,
Our codebase finds a new embrace. 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Hi,
Can you provide an example on how to use the new vector field? I tried to insert a []float32
as well as an array [768]float32
but ran into error:
db.Exec("insert into vector_table (id, embeddings) values (?,?)",
id, embeddings,
)
sql: converting argument $2 type: unsupported type [768]float32, a array
Description
MySQL 9.0.0 added support for the VECTOR type. This adds basic support so it can be handled at the protocol level.
See also https://dev.mysql.com/doc/dev/mysql-server/latest/field__types_8h.html
I have not added tests here specifically, since I also don't see any tests for some of the other types like say
GEOMETRY
and don't know how to add those then in a way that's preferred by the project.Checklist
Summary by CodeRabbit
New Features
VECTOR
in various database operations.Chores