Skip to content

Introduce SqlVectorFloat32 SqlType class for vector datatype support#3433

Merged
apoorvdeshmukh merged 13 commits intodotnet:mainfrom
apoorvdeshmukh:dev/vector/SqlVectorFloat32
Jun 25, 2025
Merged

Introduce SqlVectorFloat32 SqlType class for vector datatype support#3433
apoorvdeshmukh merged 13 commits intodotnet:mainfrom
apoorvdeshmukh:dev/vector/SqlVectorFloat32

Conversation

@apoorvdeshmukh
Copy link
Copy Markdown
Contributor

Description

Adds Vector datatype support for Float32 with Sqltype SqlVectorFloat32

Design Considerations

  • Some inputs have been considered from 📢 Proposal: Introducing SqlType `SqlVectorFloat32` for SQL Server's New VECTOR Data Type #3382
  • Between a generic class definition SqlVector and concrete type SqlVectorFloat32, after comparison it was decided to use concrete types.
  • In future we may consider using SqlVector as base class to isolate common functionality between different Vector types but the public API surface will continue to use concrete definitions so that developers know the exact supported type they are working with.
  • SqlVectorFloat32 will be encouraged as the only way to work with Float32 vector data when using SqlDbType enum value for Vector.
  • Output parameters for reading SqlVectorFloat32 return value will be initialized through SqlVectorFloat32(n) constructor for SqlParameter.Value to allow users to correctly specify the size and type for the vector data they expect to read.

Issues

Closes #3317

Testing

Tests are split into three categories
Unit Tests for SqlVectorFloat32 under SqlVectorFloat32Tests.cs
Backward Compatibility Test Suite to validate behavior when exchanging vector data as varchar(max)
Native Vector Support Test Suite highlighting the supported functionality

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area\Vector Use this for issues that are targeted for the Vector feature in the driver.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Native Vector datatype support

7 participants