- Notifications
You must be signed in to change notification settings - Fork311
Introduce SqlVectorFloat32 SqlType class for vector datatype support#3433
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Introduce SqlVectorFloat32 SqlType class for vector datatype support#3433
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This commit adds feature extension for vector datatype support.Additionally, GenericTDSServer has been enhanced to enable teststo validate login requests and response for the vector feature extension.Tests have been added under SqlConnectionBasicTests throughTestConnWithVectorFeatExtVersionNegotiation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull Request Overview
This PR introduces support for vector datatypes with a concrete SqlVectorFloat32 class that encapsulates 32‐bit float vector data. Key changes include the addition of the SqlVectorFloat32 type and its handling through TDS feature extensions, updates to resource strings and error messages, and comprehensive tests verifying the new functionality.
Reviewed Changes
Copilot reviewed 36 out of 38 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/Microsoft.Data.SqlClient/tests/tools/TDS/TDS/TDSFeatureID.cs | Added enum constant VectorSupport for TDS features. |
src/Microsoft.Data.SqlClient/tests/tools/TDS/TDS.Servers/* | Extended server session and login logic to negotiate and enable vector support. |
src/Microsoft.Data.SqlClient/tests/* | Added new tests and updated project files for SqlVectorFloat32. |
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlVectorFloat32.cs | Introduced the new type for float vector data with constructors, properties, and serialization to JSON. |
Various source files (SqlDbTypeExtensions.cs, TdsEnums.cs, SqlParameter.cs, SqlBuffer.cs, etc.) | Updated handling, type mappings, and protocol communication to support vector datatype. |
Documentation files | Updated XML documentation and resource strings for vector support. |
Files not reviewed (1)
- src/Microsoft.Data.SqlClient/src/Resources/Strings.Designer.cs: Language not supported
Comments suppressed due to low confidence (1)
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlVectorFloat32.cs:116
- [nitpick] Consider ensuring consistent indentation for the NETCORE branch to improve code readability.
ReadOnlySpan<byte> dataSpan = _rawBytes.AsSpan(8, elementCount * sizeof(float));
Uh oh!
There was an error while loading.Please reload this page.
codecovbot commentedJun 20, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #3433 +/- ##==========================================- Coverage 69.11% 60.17% -8.95%========================================== Files 280 275 -5 Lines 62128 62209 +81 ==========================================- Hits 42942 37434 -5508- Misses 19186 24775 +5589
Flags with carried forward coverage won't be shown.Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlVectorFloat32.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlVectorFloat32.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlVectorFloat32.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlVectorFloat32.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlVectorFloat32.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlVectorFloat32.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlVectorFloat32.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I have reviewed all of the implementation except SqlVectorFloat32. I'll wait to review that once you make the changes we discussed on Friday.
I will look at the tests after that.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlParameter.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlParameter.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlParameter.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlDbTypeExtensions.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks for opening the earlier discussion. I've added a few comments, but the overall API surface looks good to me.
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlBulkCopy.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDataReader.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlVectorFloat32.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlTypes/SqlVectorFloat32.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/VectorTest/NativeVectorFloat32Tests.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDataReader.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
fc950e8
intodotnet:mainUh oh!
There was an error while loading.Please reload this page.
Description
Adds Vector datatype support for Float32 with Sqltype SqlVectorFloat32
Design Considerations
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