File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed
main/java/com/databricks/jdbc/common/util
test/java/com/databricks/jdbc/common/util Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -103,8 +103,8 @@ static void ensureUpdatedDBSQLVersionInUse(IDatabricksConnection connection)
103103 // Check applicable only for SEA flow
104104 return ;
105105 }
106- String dbsqlVersion = getDBSQLVersionCached (connection );
107- if (dbsqlVersion == null || dbsqlVersion == "" ) {
106+ String dbsqlVersion = getDBSQLVersionCached (connection ). trim () ;
107+ if (WildcardUtil . isNullOrEmpty ( dbsqlVersion ) ) {
108108 // If the DBSQL version is not available, we cannot determine if the driver supports SEA.
109109 // Proceeding with the connection.
110110 return ;
Original file line number Diff line number Diff line change @@ -34,13 +34,16 @@ void setUp() {
3434 }
3535
3636 @ ParameterizedTest
37- @ CsvSource ({
38- "2023.99, true" ,
39- "2024.30, false" ,
40- "2024.29, true" ,
41- "2024.31, false" ,
42- "2025.0, false" ,
43- })
37+ @ CsvSource (
38+ value = {
39+ "2023.99, true" ,
40+ "2024.30, false" ,
41+ "2024.29, true" ,
42+ "2024.31, false" ,
43+ "2025.0, false" ,
44+ "'', false" , // empty string
45+ "' ', false" // string with one space
46+ })
4447 void testDriverSupportInSEA (String dbsqlVersion , boolean throwsError ) throws SQLException {
4548 when (connection .getConnectionContext ()).thenReturn (connectionContext );
4649 when (connectionContext .getClientType ()).thenReturn (DatabricksClientType .SQL_EXEC );
You can’t perform that action at this time.
0 commit comments