Skip to content

[VECTOR_FLOAT16] Implement feature extension and version negotiation for Vector v2 support#2868

Merged
muskan124947 merged 14 commits intomainfrom
vector_FE_v2
Feb 18, 2026
Merged

[VECTOR_FLOAT16] Implement feature extension and version negotiation for Vector v2 support#2868
muskan124947 merged 14 commits intomainfrom
vector_FE_v2

Conversation

@muskan124947
Copy link
Contributor

@muskan124947 muskan124947 commented Dec 22, 2025

Description

For upcoming VECTOR_FLOAT16 support in the Microsoft JDBC Driver for SQL Server, this PR introduces the initial framework for vector type support handling on the client side, enabling controlled negotiation of vector capabilities between client and server.

The changes focus on making vector support explicit, extensible, and future-proof, in preparation for additional vector versions and data types.

Vector Version Negotiation Flow

  • The client vector setting is parsed and validated:
off – vector support disabled
v1 – float32 vector support
v2 – float32 and float16 vector support
  • If either the client disables vectors or the server does not support vectors, vector support is disabled.
  • The client and server determine their maximum supported vector versions.
  • When both support vectors, the negotiated version is the minimum of the client and server versions.
  • The negotiated version is used for all vector-related operations for the connection.

Impact

  • Backward compatibility: Clients using only float32 continue to work without changes.
  • Performance: Float16 support reduces memory usage and network payload for supported operations.
  • Extensibility: Framework allows easy addition of future vector types and versions.

@muskan124947 muskan124947 self-assigned this Dec 22, 2025
@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.58%. Comparing base (465cfca) to head (31388c1).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
.../com/microsoft/sqlserver/jdbc/SQLServerDriver.java 73.07% 5 Missing and 2 partials ⚠️
.../microsoft/sqlserver/jdbc/SQLServerConnection.java 77.27% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2868      +/-   ##
============================================
+ Coverage     60.52%   60.58%   +0.06%     
- Complexity     4898     4904       +6     
============================================
  Files           151      151              
  Lines         34788    34822      +34     
  Branches       5829     5833       +4     
============================================
+ Hits          21056    21098      +42     
+ Misses        10916    10910       -6     
+ Partials       2816     2814       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@muskan124947
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Contributor

Copilot AI left a 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 extends the Microsoft SQL Server JDBC driver’s vector feature support to introduce an explicit vectorTypeSupport version model, including v2 (float32 + float16) and client–server negotiation of supported vector versions.

Changes:

  • Introduces a VectorTypeSupport enum and TDS constants for vector feature extension, wiring them into connection properties and feature negotiation during login.
  • Adds client–server vector version negotiation in SQLServerConnection, with a tracked negotiatedVectorVersion and a getter, and updates resource strings and public APIs (ISQLServerConnection, ISQLServerDataSource, pool proxy) to document v2 support.
  • Updates tests and helpers (e.g., VectorTest and property metadata) to recognize "v2" as a valid vectorTypeSupport value and to support float16-specific behavior.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/main/java/com/microsoft/sqlserver/jdbc/SQLServerDriver.java Adds VectorTypeSupport enum mapping logical values to TDS versions, updates the vectorTypeSupport driver property default, and exposes the allowed values via SQLServerDriverPropertyInfo for configuration tooling.
src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java Reworks vector-type configuration to use VectorTypeSupport, adds negotiatedVectorVersion state, integrates vector version negotiation into feature extension ACK handling, and exposes getNegotiatedVectorVersion().
src/main/java/com/microsoft/sqlserver/jdbc/IOBuffer.java Extends TDS constants for vector support to define explicit v1 and v2 values and updates the maximum supported version to 2.
src/main/java/com/microsoft/sqlserver/jdbc/SQLServerResource.java Updates resource strings for vectorTypeSupport to document the new valid value "v2" and keep error messages aligned with the property’s semantics.
src/main/java/com/microsoft/sqlserver/jdbc/ISQLServerConnection.java Updates the setVectorTypeSupport / getVectorTypeSupport Javadoc to describe v2, aligning the public connection interface with the extended vector support options.
src/main/java/com/microsoft/sqlserver/jdbc/ISQLServerDataSource.java Mirrors the vectorTypeSupport documentation updates on the DataSource API to include v2 and clarify behavior.
src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnectionPoolProxy.java Propagates and documents the extended vectorTypeSupport property through the pooled connection proxy.
src/test/java/com/microsoft/sqlserver/jdbc/datatypes/VectorTest.java Extends the test helper connection factory to accept "v2" as a valid vectorTypeSupport value while otherwise preserving existing vector behavior tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 12 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

machavan
machavan previously approved these changes Feb 16, 2026
divang

This comment was marked as off-topic.

@muskan124947
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@muskan124947 muskan124947 added this to the 13.3.2 milestone Feb 17, 2026
@github-project-automation github-project-automation bot moved this to In progress in MSSQL JDBC Feb 17, 2026
@muskan124947 muskan124947 merged commit 85ebc77 into main Feb 18, 2026
19 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Closed/Merged PRs in MSSQL JDBC Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed/Merged PRs

Development

Successfully merging this pull request may close these issues.

4 participants

Comments