Skip to content

Commit e6096d8

Browse files
authored
Vector datatype support (#2634)
* Vector feature extension * Added initial skeleton code for VECTOR support in JDBC * Added Vector support and strategy in DataTypes and dtv * Added changes which got removed from previous commit * Added support to read vector object using getObject * Updated read API for Vector support and created custom Vector class to decode/encode data, along with additional features like dimensionType, and dimensionCount. * Updated getObject() API to skip 8-byte header in Vector class and improved constructor parameter positioning for clarity, removed VectorInputStream * Added support for setVector() API, updated setObject() to handle dimensionCount for vector, fixed datatype and tdsType mappings along with setting correct typeDefinition in Parameter class. * Updated the setObject API to support vector insertion and fixed RPC Vector handling to ensure insertion of vector data. * Validated insert and read for sample and max-length (1998) vector data, and measured performance for max-length vectors at varying scales — 100, 1K, 10K, 100K, and 1M records. * Updated insert logic to make batch size configurable for single-batch performance testing. * Updated writeRPCVector to correctly write data to server and handle null insertion correctly, added test case to validate null insertion and test vectorsupport feature enabled. Removed getVector, setVector and updated existing setObject() along with adding helper functions in Vector class. * Stored Procedure support for VECTOR Type using registerOutParameter, getObject, and setObject APIs. * Added support for SQLServerBulkCopy, prepared statement using useBulkCopyForBatchInsert and added support for vector datatype in SQLServerBulkCSVFileRecord along with updating strategy for Vector type in dtv.java * Updated to use scale as dimensionType and precision as dimensionCount for read, insert, bulkCopy, bulkCopyCSV operation and corrected typeInfo and Parameter.java along with adding test cases for BulkCopy * Added Table-Valued Parameter (TVP) support for the VECTOR type, validated insertion and retrieval of VECTOR data, and updated stored procedure and TVP definitions to use scale as dimensionType and precision as dimensionCount. * Added performance testing tests for bulkCopy and insert using useBulkCopyForBatchInsert along with updating getObject() when data is null * Added test case to validate vector as input and output in user-defined functions (UDFs); fixed previously failing test case. * Added vector as non-searchable and Validated select*into, UDF and SVF by returning normalised vector, global and local temp tables * Added test to validate transaction rollback, database view and Metadata information for vector data type * Validate bulk copy scenarios with source and destination as -vector & varbinary combinations -vector and varchar combinations * POC-BulkCopy usign CSV file and added tests to check different scenarios along with adding test for setObject(getObject()) * Added test scenarios to validate failures when insert and bulk copy operation is performed for mismatched source and destination tables * Addressed comments, Updated dimensionType naming similar to server side, added functions to getScale, bytesperDimension and updated the logic to use functions instead of handling hardcoded values * Added support to construct vector object using scaleByte * Updated logic to support initialising vector object using precision and scale value also * Updated convertStreamToObject to handle backward compatibility and updated toString() for Vector to return json formatted string * handled backward compatibility by throwing error if getString() is used * Refactored Vector class to use Object[] for vector data storage and serialization instead of float[] and updated the test cases. * Updated toString() method for vector and addressed test failures * Added stored procedure support for null VECTOR type and validated registerOutParameter, getObject, and setObject APIs. * Addressed comments * Added vectorTypeSupport connection string property {off,v1} * Addressed comments * Removed getter, setter and updater conversion * Updated getter, setter and updater conversion in DataTypes class * Added xVectorType exclusion tag for tests using vector types. * Updated tag name to xSQLv25 to reflect support for vector type introduced in SQL Server 2025 onwards * Updated tag name to xVectorType * Updated tag name to vectorTest. * Updated failures in RequestBoundaryMethodsTest class * Addressed comments * Addressed comments and failures in ADO pipeline * Updated setObject() for CallableStatement * Addressed comments * Updated build.gradle file to exclude vectorTest tag * Updated Vector class * Refactored Vector class and added VectorUtils.java to include helper functions * Updated Vector class and VectorUtils class * Added test scenarios * git merge main and updated public pipeline to exclude vectorTest * Refactored vector class to use FLOAT32 and addressed comments * Addressed comments
1 parent 6c85e2c commit e6096d8

37 files changed

+3662
-43
lines changed

build.gradle

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ allprojects {
2929

3030
test {
3131
useJUnitPlatform {
32-
excludeTags (hasProperty('excludedGroups') ? excludedGroups : 'xSQLv15','xGradle','reqExternalSetup','NTLM','MSI','clientCertAuth','fedAuth','kerberos')
32+
excludeTags (hasProperty('excludedGroups') ? excludedGroups : 'xSQLv15','xGradle','reqExternalSetup','NTLM','MSI','clientCertAuth','fedAuth','kerberos','vectorTest')
3333
}
3434
}
3535

@@ -44,6 +44,11 @@ if (!hasProperty('buildProfile') || (hasProperty('buildProfile') && buildProfile
4444
}
4545
sourceCompatibility = 23
4646
targetCompatibility = 23
47+
test {
48+
useJUnitPlatform {
49+
excludeTags(hasProperty('excludedGroups') ? excludedGroups : 'vectorTest')
50+
}
51+
}
4752
}
4853

4954
if (hasProperty('buildProfile') && buildProfile == "jre21") {
@@ -57,6 +62,11 @@ if (hasProperty('buildProfile') && buildProfile == "jre21") {
5762
}
5863
sourceCompatibility = 21
5964
targetCompatibility = 21
65+
test {
66+
useJUnitPlatform {
67+
excludeTags(hasProperty('excludedGroups') ? excludedGroups : 'vectorTest')
68+
}
69+
}
6070
}
6171

6272
if (hasProperty('buildProfile') && buildProfile == "jre17") {
@@ -70,6 +80,11 @@ if (hasProperty('buildProfile') && buildProfile == "jre17") {
7080
}
7181
sourceCompatibility = 17
7282
targetCompatibility = 17
83+
test {
84+
useJUnitPlatform {
85+
excludeTags(hasProperty('excludedGroups') ? excludedGroups : 'vectorTest')
86+
}
87+
}
7388
}
7489

7590
if (hasProperty('buildProfile') && buildProfile == "jre11") {
@@ -83,6 +98,11 @@ if (hasProperty('buildProfile') && buildProfile == "jre11") {
8398
}
8499
sourceCompatibility = 11
85100
targetCompatibility = 11
101+
test {
102+
useJUnitPlatform {
103+
excludeTags(hasProperty('excludedGroups') ? excludedGroups : 'vectorTest')
104+
}
105+
}
86106
}
87107

88108
if(hasProperty('buildProfile') && buildProfile == "jre8") {
@@ -94,7 +114,7 @@ if(hasProperty('buildProfile') && buildProfile == "jre8") {
94114
targetCompatibility = 1.8
95115
test {
96116
useJUnitPlatform {
97-
excludeTags (hasProperty('excludedGroups') ? excludedGroups : 'xSQLv15','xGradle','NTLM','reqExternalSetup','MSI','clientCertAuth','fedAuth','xJDBC42')
117+
excludeTags (hasProperty('excludedGroups') ? excludedGroups : 'xSQLv15','xGradle','NTLM','reqExternalSetup','MSI','clientCertAuth','fedAuth','xJDBC42','vectorTest')
98118
}
99119
}
100120
}

pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,11 @@
4646
kerberos - - - - - For tests using Kerberos authentication (excluded by default)
4747
reqExternalSetup - For tests requiring external setup (excluded by default)
4848
clientCertAuth - - For tests requiring client certificate authentication
49+
vectorTest - - For tests using vector data types (excluded by default)
4950
setup (excluded by default) - - - - - - - - - - - - - - - - - - - - - - -
5051
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
5152
Default testing enabled with SQL Server 2019 (SQLv15) -->
52-
<excludedGroups>xSQLv12,xSQLv15,NTLM,MSI,reqExternalSetup,clientCertAuth,fedAuth,kerberos</excludedGroups>
53+
<excludedGroups>xSQLv12,xSQLv15,NTLM,MSI,reqExternalSetup,clientCertAuth,fedAuth,kerberos,vectorTest</excludedGroups>
5354
<!-- Use -preview for preview release, leave empty for official release. -->
5455
<releaseExt></releaseExt>
5556
<!-- Driver Dependencies -->

src/main/java/com/microsoft/sqlserver/jdbc/Column.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import java.text.MessageFormat;
99
import java.util.Calendar;
1010

11-
1211
/**
1312
* Column represents a database column definition (meta data) within a result set.
1413
*/
@@ -345,7 +344,7 @@ else if (jdbcType.isBinary()) {
345344

346345
// Update of binary SSType from textual JDBCType: Convert hex to binary.
347346
else if ((SSType.BINARY == ssType || SSType.VARBINARY == ssType || SSType.VARBINARYMAX == ssType
348-
|| SSType.IMAGE == ssType || SSType.UDT == ssType) &&
347+
|| SSType.IMAGE == ssType || SSType.UDT == ssType || SSType.VECTOR == ssType) &&
349348

350349
(JDBCType.CHAR == jdbcType || JDBCType.VARCHAR == jdbcType || JDBCType.LONGVARCHAR == jdbcType)) {
351350
jdbcType = JDBCType.VARBINARY;

src/main/java/com/microsoft/sqlserver/jdbc/DDC.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,7 @@ static final Object convertStreamToObject(BaseInputStream stream, TypeInfo typeI
726726
case VARBINARY:
727727
case LONGVARBINARY:
728728
case BLOB:
729+
case VECTOR:
729730
// Where allowed, streams convert directly to binary representation
730731
if (StreamType.BINARY == getterArgs.streamType)
731732
return stream;
@@ -798,6 +799,10 @@ static final Object convertStreamToObject(BaseInputStream stream, TypeInfo typeI
798799
return new StringReader(new String(stream.getBytes(), typeInfo.getCharset()));
799800
}
800801

802+
if (typeInfo.getSSType() == SSType.VECTOR) {
803+
throw new SQLServerException(SQLServerException.getErrString("R_getStringNotSupportedForVector"), null, 0, null);
804+
}
805+
801806
// None of the special/fast textual conversion cases applied. Just go the normal route of converting
802807
// via String.
803808
return convertStringToObject(new String(stream.getBytes(), typeInfo.getCharset()),

src/main/java/com/microsoft/sqlserver/jdbc/DataTypes.java

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ enum TDSType {
6666
NTEXT(0x63), // 99
6767
UDT(0xF0), // -16
6868
XML(0xF1), // -15
69+
VECTOR(0xF5), // 245
6970

7071
// LONGLEN types
7172
SQL_VARIANT(0x62); // 98
@@ -149,7 +150,8 @@ enum SSType {
149150
XML(Category.XML, "xml", JDBCType.LONGNVARCHAR),
150151
TIMESTAMP(Category.TIMESTAMP, "timestamp", JDBCType.BINARY),
151152
GEOMETRY(Category.UDT, "geometry", JDBCType.GEOMETRY),
152-
GEOGRAPHY(Category.UDT, "geography", JDBCType.GEOGRAPHY);
153+
GEOGRAPHY(Category.UDT, "geography", JDBCType.GEOGRAPHY),
154+
VECTOR(Category.VECTOR, "vector", JDBCType.VECTOR);
153155

154156
final Category category;
155157
private final String name;
@@ -205,7 +207,8 @@ enum Category {
205207
TIMESTAMP,
206208
UDT,
207209
SQL_VARIANT,
208-
XML;
210+
XML,
211+
VECTOR;
209212

210213
private static final Category[] VALUES = values();
211214
}
@@ -267,7 +270,9 @@ enum GetterConversion {
267270

268271
SQL_VARIANT(SSType.Category.SQL_VARIANT, EnumSet.of(JDBCType.Category.CHARACTER, JDBCType.Category.SQL_VARIANT,
269272
JDBCType.Category.NUMERIC, JDBCType.Category.DATE, JDBCType.Category.TIME, JDBCType.Category.BINARY,
270-
JDBCType.Category.TIMESTAMP, JDBCType.Category.NCHARACTER, JDBCType.Category.GUID));
273+
JDBCType.Category.TIMESTAMP, JDBCType.Category.NCHARACTER, JDBCType.Category.GUID)),
274+
275+
VECTOR(SSType.Category.VECTOR, EnumSet.of(JDBCType.Category.VECTOR));
271276

272277
private final SSType.Category from;
273278
private final EnumSet<JDBCType.Category> to;
@@ -454,7 +459,9 @@ JDBCType getJDBCType(SSType ssType, JDBCType jdbcTypeFromApp) {
454459
case NTEXT:
455460
jdbcType = JDBCType.LONGVARCHAR;
456461
break;
457-
462+
case VECTOR:
463+
jdbcType = JDBCType.VECTOR;
464+
break;
458465
case XML:
459466
default:
460467
jdbcType = JDBCType.LONGVARBINARY;
@@ -478,6 +485,7 @@ JDBCType getJDBCType(SSType ssType, JDBCType jdbcTypeFromApp) {
478485
READER(Reader.class, JDBCType.LONGVARCHAR),
479486
// Note: Only SQLServerSQLXML SQLXML instances are accepted by this driver
480487
SQLXML(SQLServerSQLXML.class, JDBCType.SQLXML),
488+
VECTOR(microsoft.sql.Vector.class, JDBCType.VECTOR),
481489
OBJECT(Object.class, JDBCType.UNKNOWN);
482490

483491
private final Class<?> javaClass;
@@ -677,7 +685,8 @@ enum JDBCType {
677685
SQL_VARIANT(Category.SQL_VARIANT, microsoft.sql.Types.SQL_VARIANT, Object.class.getName()),
678686
GEOMETRY(Category.GEOMETRY, microsoft.sql.Types.GEOMETRY, Object.class.getName()),
679687
GEOGRAPHY(Category.GEOGRAPHY, microsoft.sql.Types.GEOGRAPHY, Object.class.getName()),
680-
LOCALDATETIME(Category.TIMESTAMP, java.sql.Types.TIMESTAMP, LocalDateTime.class.getName());
688+
LOCALDATETIME(Category.TIMESTAMP, java.sql.Types.TIMESTAMP, LocalDateTime.class.getName()),
689+
VECTOR(Category.VECTOR, microsoft.sql.Types.VECTOR, microsoft.sql.Vector.class.getName());
681690

682691
final Category category;
683692
private final int intValue;
@@ -726,7 +735,8 @@ enum Category {
726735
GUID,
727736
SQL_VARIANT,
728737
GEOMETRY,
729-
GEOGRAPHY;
738+
GEOGRAPHY,
739+
VECTOR;
730740

731741
private static final Category[] VALUES = values();
732742
}
@@ -799,7 +809,9 @@ enum SetterConversion {
799809

800810
GEOMETRY(JDBCType.Category.GEOMETRY, EnumSet.of(JDBCType.Category.GEOMETRY)),
801811

802-
GEOGRAPHY(JDBCType.Category.GEOGRAPHY, EnumSet.of(JDBCType.Category.GEOGRAPHY));
812+
GEOGRAPHY(JDBCType.Category.GEOGRAPHY, EnumSet.of(JDBCType.Category.GEOGRAPHY)),
813+
814+
VECTOR(JDBCType.Category.VECTOR, EnumSet.of(JDBCType.Category.VECTOR));
803815

804816
private final JDBCType.Category from;
805817
private final EnumSet<JDBCType.Category> to;
@@ -836,11 +848,11 @@ enum UpdaterConversion {
836848
SSType.Category.DATETIMEOFFSET, SSType.Category.CHARACTER, SSType.Category.LONG_CHARACTER,
837849
SSType.Category.NCHARACTER, SSType.Category.LONG_NCHARACTER, SSType.Category.XML,
838850
SSType.Category.BINARY, SSType.Category.LONG_BINARY, SSType.Category.UDT, SSType.Category.GUID,
839-
SSType.Category.TIMESTAMP, SSType.Category.SQL_VARIANT)),
851+
SSType.Category.TIMESTAMP, SSType.Category.SQL_VARIANT, SSType.Category.VECTOR)),
840852

841853
LONG_CHARACTER(JDBCType.Category.LONG_CHARACTER, EnumSet.of(SSType.Category.CHARACTER,
842854
SSType.Category.LONG_CHARACTER, SSType.Category.NCHARACTER, SSType.Category.LONG_NCHARACTER,
843-
SSType.Category.XML, SSType.Category.BINARY, SSType.Category.LONG_BINARY)),
855+
SSType.Category.XML, SSType.Category.BINARY, SSType.Category.LONG_BINARY, SSType.Category.VECTOR)),
844856

845857
CLOB(JDBCType.Category.CLOB, EnumSet.of(SSType.Category.LONG_CHARACTER, SSType.Category.LONG_NCHARACTER,
846858
SSType.Category.XML)),
@@ -899,7 +911,10 @@ enum UpdaterConversion {
899911
SSType.Category.DATETIMEOFFSET, SSType.Category.CHARACTER, SSType.Category.LONG_CHARACTER,
900912
SSType.Category.NCHARACTER, SSType.Category.LONG_NCHARACTER)),
901913

902-
SQL_VARIANT(JDBCType.Category.SQL_VARIANT, EnumSet.of(SSType.Category.SQL_VARIANT));
914+
SQL_VARIANT(JDBCType.Category.SQL_VARIANT, EnumSet.of(SSType.Category.SQL_VARIANT)),
915+
916+
VECTOR(JDBCType.Category.VECTOR, EnumSet.of(SSType.Category.CHARACTER, SSType.Category.LONG_CHARACTER,
917+
SSType.Category.VECTOR));
903918

904919
private final JDBCType.Category from;
905920
private final EnumSet<SSType.Category> to;
@@ -1002,6 +1017,8 @@ int asJavaSqlType() {
10021017
case NVARCHAR:
10031018
case SQLXML:
10041019
return java.sql.Types.VARCHAR;
1020+
case VECTOR:
1021+
return microsoft.sql.Types.VECTOR;
10051022
case LONGNVARCHAR:
10061023
return java.sql.Types.LONGVARCHAR;
10071024
case NCLOB:

src/main/java/com/microsoft/sqlserver/jdbc/IOBuffer.java

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
import com.microsoft.sqlserver.jdbc.SQLServerConnection.FedAuthTokenCommand;
8383
import com.microsoft.sqlserver.jdbc.dataclassification.SensitivityClassification;
8484

85+
import microsoft.sql.Vector;
8586

8687
final class TDS {
8788
// application protocol
@@ -169,6 +170,11 @@ final class TDS {
169170
static final byte TDS_FEATURE_EXT_AZURESQLDNSCACHING = 0x0B;
170171
static final byte TDS_FEATURE_EXT_SESSIONRECOVERY = 0x01;
171172

173+
// Vector support
174+
static final byte TDS_FEATURE_EXT_VECTORSUPPORT = 0x0E;
175+
static final byte VECTORSUPPORT_NOT_SUPPORTED = 0x00;
176+
static final byte MAX_VECTORSUPPORT_VERSION = 0x01;
177+
172178
static final int TDS_TVP = 0xF3;
173179
static final int TVP_ROW = 0x01;
174180
static final int TVP_NULL_TOKEN = 0xFFFF;
@@ -237,6 +243,8 @@ static final String getTokenName(int tdsTokenType) {
237243
return "TDS_FEATURE_EXT_AZURESQLDNSCACHING (0x0B)";
238244
case TDS_FEATURE_EXT_SESSIONRECOVERY:
239245
return "TDS_FEATURE_EXT_SESSIONRECOVERY (0x01)";
246+
case TDS_FEATURE_EXT_VECTORSUPPORT:
247+
return "TDS_FEATURE_EXT_VECTORSUPPORT (0x0E)";
240248
default:
241249
return "unknown token (0x" + Integer.toHexString(tdsTokenType).toUpperCase() + ")";
242250
}
@@ -5374,6 +5382,15 @@ else if (DataTypes.UNKNOWN_STREAM_LENGTH == dataLength)
53745382
internalJDBCType = javaType.getJDBCType(SSType.UNKNOWN, jdbcType);
53755383
writeInternalTVPRowValues(internalJDBCType, currentColumnStringValue, currentObject, columnPair, true);
53765384
break;
5385+
5386+
case VECTOR:
5387+
byte[] bValue = (currentObject == null) ? null : (byte[]) currentObject;
5388+
writeShort((short) (bValue == null ? -1 : bValue.length));
5389+
if (bValue != null) {
5390+
writeBytes(bValue);
5391+
}
5392+
break;
5393+
53775394
default:
53785395
assert false : "Unexpected JDBC type " + jdbcType.toString();
53795396
}
@@ -5507,6 +5524,13 @@ void writeTVPColumnMetaData(TVP value) throws SQLServerException {
55075524
writeInt(TDS.SQL_VARIANT_LENGTH);// write length of sql variant 8009
55085525

55095526
break;
5527+
5528+
case VECTOR:
5529+
writeByte(TDSType.VECTOR.byteValue());
5530+
writeShort((short) (VectorUtils.getVectorLength(pair.getValue().scale, pair.getValue().precision))); // max length
5531+
byte scaleByte = (byte) (VectorUtils.getScaleByte(pair.getValue().scale));
5532+
writeByte((byte) scaleByte); // scale
5533+
break;
55105534

55115535
default:
55125536
assert false : "Unexpected JDBC type " + jdbcType.toString();
@@ -5632,6 +5656,30 @@ void writeCryptoMetaData() throws SQLServerException {
56325656
writeByte(cryptoMeta.normalizationRuleVersion);
56335657
}
56345658

5659+
void writeRPCVector(String sName, Vector vectorValue, boolean bOut, int scale, int precision)
5660+
throws SQLServerException {
5661+
boolean vectorValueNull = (vectorValue == null);
5662+
byte[] bValue = vectorValueNull ? null : VectorUtils.toBytes(vectorValue);
5663+
5664+
writeRPCNameValType(sName, bOut, TDSType.VECTOR);
5665+
5666+
if (vectorValueNull) {
5667+
writeShort((short) (VectorUtils.getVectorLength(scale, precision))); // max length
5668+
byte scaleByte = (byte) (VectorUtils.getScaleByte(scale));
5669+
writeByte((byte) scaleByte); // scale (dimension type)
5670+
writeShort((short) -1); // actual len
5671+
} else {
5672+
writeShort((short) VectorUtils.getVectorLength(vectorValue)); // max length
5673+
writeByte((byte) VectorUtils.getScaleByte(vectorValue.getVectorDimensionType())); // scale (dimension type)
5674+
if (vectorValue.getData() == null) {
5675+
writeShort((short) -1); // actual len
5676+
} else {
5677+
writeShort((short) VectorUtils.getVectorLength(vectorValue)); // actual len
5678+
writeBytes(bValue); // data
5679+
}
5680+
}
5681+
}
5682+
56355683
void writeRPCByteArray(String sName, byte[] bValue, boolean bOut, JDBCType jdbcType,
56365684
SQLCollation collation) throws SQLServerException {
56375685
boolean bValueNull = (bValue == null);

src/main/java/com/microsoft/sqlserver/jdbc/ISQLServerConnection.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,4 +652,23 @@ CallableStatement prepareCall(String sql, int nType, int nConcur, int nHold,
652652
* @return boolean value for bulkCopyForBatchInsertAllowEncryptedValueModifications.
653653
*/
654654
boolean getBulkCopyForBatchInsertAllowEncryptedValueModifications();
655+
656+
/**
657+
* Sets the value of the vectorTypeSupport connection property.
658+
*
659+
* @param vectorTypeSupport
660+
* A string that indicates the vector type support during connection initialization.
661+
* Valid values are "off" (vector types are returned as strings) and "v1" (vectors of type FLOAT32 are returned as vectors).
662+
* Default is "v1".
663+
*/
664+
void setVectorTypeSupport(String vectorTypeSupport);
665+
666+
/**
667+
* Returns the value of the vectorTypeSupport connection property.
668+
*
669+
* @return vectorTypeSupport
670+
* The current vector type support setting ("off" or "v1").
671+
*/
672+
String getVectorTypeSupport();
673+
655674
}

src/main/java/com/microsoft/sqlserver/jdbc/ISQLServerDataSource.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,6 +1084,24 @@ public interface ISQLServerDataSource extends javax.sql.CommonDataSource {
10841084
* @return whether to allow encrypted value modifications during bulk copy operations created from batch insert operations.
10851085
*/
10861086
boolean getBulkCopyForBatchInsertAllowEncryptedValueModifications();
1087+
1088+
/**
1089+
* Sets the value of the vectorTypeSupport connection property.
1090+
*
1091+
* @param vectorTypeSupport
1092+
* A string that indicates the vector type support during connection initialization.
1093+
* Valid values are "off" (vector types are returned as strings) and "v1" (vectors of type FLOAT32 are returned as vectors).
1094+
* Default is "v1".
1095+
*/
1096+
void setVectorTypeSupport(String vectorTypeSupport);
1097+
1098+
/**
1099+
* Returns the value of the vectorTypeSupport connection property.
1100+
*
1101+
* @return vectorTypeSupport
1102+
* The current vector type support setting ("off" or "v1").
1103+
*/
1104+
String getVectorTypeSupport();
10871105

10881106
/**
10891107
* Sets the client id to be used to retrieve the access token for a user-assigned Managed Identity.

0 commit comments

Comments
 (0)