Skip to content

Commit 42fef49

Browse files
committed
Fix | Disable unicode char/varchar mapping to nchar/nvarchar against Azure DW
1 parent 60d9976 commit 42fef49

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -3573,6 +3573,6 @@ protected void setDestinationTableMetadata(SQLServerResultSet rs) {
35733573
private boolean unicodeConversionRequired(int jdbcType, SSType ssType) {
35743574
return ((java.sql.Types.CHAR == jdbcType || java.sql.Types.VARCHAR == jdbcType
35753575
|| java.sql.Types.LONGNVARCHAR == jdbcType)
3576-
&& (SSType.NCHAR == ssType || SSType.NVARCHAR == ssType || SSType.NVARCHARMAX == ssType));
3576+
&& (SSType.NCHAR == ssType || SSType.NVARCHAR == ssType || SSType.NVARCHARMAX == ssType) && !connection.isAzureDW());
35773577
}
35783578
}

src/test/java/com/microsoft/sqlserver/jdbc/bulkCopy/BulkCopyColumnMappingTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ public void testInvalidCM() throws SQLException {
365365
}
366366
}
367367
}
368-
368+
@Tag(Constants.xAzureSQLDW)
369369
@Test
370370
@DisplayName("BulkCopy:test unicode char/varchar to nchar/nvarchar")
371371
public void testUnicodeCharToNchar() throws SQLException, ClassNotFoundException {

0 commit comments

Comments
 (0)