Skip to content

Add comprehensive test suite for mixed-type vector columns (float32 and float16)#2907

Merged
muskan124947 merged 4 commits intomainfrom
users/muskgupta/float16And32
Mar 11, 2026
Merged

Add comprehensive test suite for mixed-type vector columns (float32 and float16)#2907
muskan124947 merged 4 commits intomainfrom
users/muskgupta/float16And32

Conversation

@muskan124947
Copy link
Copy Markdown
Contributor

@muskan124947 muskan124947 commented Mar 5, 2026

Description

Building on the existing VECTOR(FLOAT316) support, this PR expands the test suite to validate driver behavior when FLOAT32 and FLOAT16 vector columns coexist within the same schema. This requires vectorTypeSupport=v2.

The tests cover both standard JDBC execution paths and bulk copy scenarios to ensure correct functionality across mixed vector types.

Changes

  • Added a new CSV resource containing mixed FLOAT32 and FLOAT16 vector column data for bulk copy testing.
  • Extended FLOAT16 bulk-copy tests to include mixed-type scenarios (FLOAT32 + FLOAT16) covering:
    • Table-to-table bulk copy
    • CSV bulk copy
    • ISQLServerBulkData
    • Batch insert with bulk copy
  • Expanded FLOAT16 vector tests to support mixed-type table scenarios, including:
    • CRUD operations
    • Null handling
    • Metadata validation
    • Table-Valued Parameters (TVPs)
    • Stored procedures
    • Transactions
    • Temporary tables
    • Views
    • User-defined functions (UDFs)

Related PRs

Performance Testing

(Tests performed using FLOAT32 vectors with dimensionCount = 1998. Timings include both serialization and deserialization overhead.)

Number of Records Insert operation (ms) Insert with useBulkCopyForBatchInsert (ms) Bulk Copy operation (ms)
1 50 344 314
100 238 429 443
1,000 833 738 892
10,000 5,800 2,385 2,081
100,000 48,354 14,098 14,881
1,000,000 396,687 119,984 120,652

@muskan124947 muskan124947 self-assigned this Mar 5, 2026
@github-project-automation github-project-automation Bot moved this to In progress in MSSQL JDBC Mar 5, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.61%. Comparing base (acf6ea4) to head (9dbdd07).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2907      +/-   ##
============================================
- Coverage     60.65%   60.61%   -0.04%     
+ Complexity     4926     4910      -16     
============================================
  Files           151      151              
  Lines         35000    35000              
  Branches       5854     5854              
============================================
- Hits          21229    21216      -13     
  Misses        10938    10938              
- Partials       2833     2846      +13     

☔ 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.

Copy link
Copy Markdown
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

Adds an expanded test suite to validate driver behavior when FLOAT32 and FLOAT16 vector columns coexist in the same schema (requires vectorTypeSupport=v2), covering both “regular” JDBC paths and bulk-copy paths.

Changes:

  • Added a new CSV resource containing mixed FLOAT32/FLOAT16 vector column data for bulk copy scenarios.
  • Extended FLOAT16 bulk-copy tests with mixed-type (FLOAT32+FLOAT16) table-to-table, CSV, ISQLServerBulkData, and batch-insert coverage.
  • Extended FLOAT16 vector tests with mixed-type table scenarios (CRUD, null handling, metadata, TVPs, stored procedures, transactions, temp tables, views, UDFs).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
src/test/resources/BulkCopyCSVTestInputMixedVectorType.csv New CSV input for mixed FLOAT32/FLOAT16 vector bulk-copy tests.
src/test/java/com/microsoft/sqlserver/jdbc/datatypes/vector/bulkcopy/VectorFloat16BulkCopyTest.java Adds a nested mixed-type bulk-copy test suite alongside existing FLOAT16 bulk-copy coverage.
src/test/java/com/microsoft/sqlserver/jdbc/datatypes/vector/VectorFloat16Test.java Adds a nested mixed-type vector test suite covering JDBC operations, metadata, TVPs, procs, and transactions.

You can also share your feedback on Copilot code review. Take the survey.

@muskan124947 muskan124947 changed the title [WIP] Add comprehensive test suite for mixed-type vector columns (float32 and float16) Add comprehensive test suite for mixed-type vector columns (float32 and float16) Mar 5, 2026
@muskan124947 muskan124947 added the Under Review Used for pull requests under review label Mar 5, 2026
@muskan124947
Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Copy Markdown
Contributor

@divang divang left a comment

Choose a reason for hiding this comment

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

Please check if there is any duplicate logic in the test cases, such as getMixedConnectionString() or other similar scenarios.

@muskan124947 muskan124947 merged commit 5764d8f into main Mar 11, 2026
18 of 19 checks passed
@github-project-automation github-project-automation Bot moved this from In progress to Closed/Merged PRs in MSSQL JDBC Mar 11, 2026
@muskan124947 muskan124947 removed the Under Review Used for pull requests under review label Mar 11, 2026
@machavan machavan added this to the 13.4.0 milestone Mar 14, 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.

5 participants