diff --git a/src/main/java/net/snowflake/client/core/SFArrowResultSet.java b/src/main/java/net/snowflake/client/core/SFArrowResultSet.java index aa331ed54..ff0142377 100644 --- a/src/main/java/net/snowflake/client/core/SFArrowResultSet.java +++ b/src/main/java/net/snowflake/client/core/SFArrowResultSet.java @@ -570,7 +570,7 @@ public Object getObject(int columnIndex) throws SFException { @SnowflakeJdbcInternalApi @Override - public Object getObject(int columnIndex, Class type) throws SFException { + public Object getObjectWithoutString(int columnIndex) throws SFException { return getObjectRepresentation(columnIndex, false); } diff --git a/src/main/java/net/snowflake/client/core/SFBaseResultSet.java b/src/main/java/net/snowflake/client/core/SFBaseResultSet.java index 5a45c82b1..cd1539a5d 100644 --- a/src/main/java/net/snowflake/client/core/SFBaseResultSet.java +++ b/src/main/java/net/snowflake/client/core/SFBaseResultSet.java @@ -114,7 +114,7 @@ public abstract class SFBaseResultSet { public abstract Object getObject(int columnIndex) throws SFException; @SnowflakeJdbcInternalApi - public abstract Object getObject(int columnIndex, Class type) throws SFException; + public abstract Object getObjectWithoutString(int columnIndex) throws SFException; public Array getArray(int columnIndex) throws SFException { throw new UnsupportedOperationException(); diff --git a/src/main/java/net/snowflake/client/core/SFJsonResultSet.java b/src/main/java/net/snowflake/client/core/SFJsonResultSet.java index 1070d04fd..d6a65aaaa 100644 --- a/src/main/java/net/snowflake/client/core/SFJsonResultSet.java +++ b/src/main/java/net/snowflake/client/core/SFJsonResultSet.java @@ -105,7 +105,7 @@ public Object getObject(int columnIndex) throws SFException { @SnowflakeJdbcInternalApi @Override - public Object getObject(int columnIndex, Class type) throws SFException { + public Object getObjectWithoutString(int columnIndex) throws SFException { return getObject(columnIndex); } /** diff --git a/src/main/java/net/snowflake/client/jdbc/SnowflakeBaseResultSet.java b/src/main/java/net/snowflake/client/jdbc/SnowflakeBaseResultSet.java index bd01cff15..c92be254e 100644 --- a/src/main/java/net/snowflake/client/jdbc/SnowflakeBaseResultSet.java +++ b/src/main/java/net/snowflake/client/jdbc/SnowflakeBaseResultSet.java @@ -1398,7 +1398,7 @@ public T getObject(int columnIndex, Class type) throws SQLException { SnowflakeUtil.mapSFExceptionToSQLException( () -> { StructObjectWrapper structObjectWrapper = - (StructObjectWrapper) sfBaseResultSet.getObject(columnIndex); + (StructObjectWrapper) sfBaseResultSet.getObjectWithoutString(columnIndex); if (structObjectWrapper == null) { return null; } @@ -1642,7 +1642,7 @@ public Map getMap(int columnIndex, Class type) throws SQLExcep StructObjectWrapper structObjectWrapper = (StructObjectWrapper) SnowflakeUtil.mapSFExceptionToSQLException( - () -> sfBaseResultSet.getObject(columnIndex, type)); + () -> sfBaseResultSet.getObjectWithoutString(columnIndex)); if (structObjectWrapper == null) { return null; } diff --git a/src/test/java/net/snowflake/client/jdbc/structuredtypes/ResultSetStructuredTypesLatestIT.java b/src/test/java/net/snowflake/client/jdbc/structuredtypes/ResultSetStructuredTypesLatestIT.java index f9b3368d8..532d78ace 100644 --- a/src/test/java/net/snowflake/client/jdbc/structuredtypes/ResultSetStructuredTypesLatestIT.java +++ b/src/test/java/net/snowflake/client/jdbc/structuredtypes/ResultSetStructuredTypesLatestIT.java @@ -265,7 +265,6 @@ public void testReturnAsArrayOfNullableFieldsInSqlData(ResultSetFormatType forma (resultSet) -> { NullableFieldsSqlData result = resultSet - .unwrap(SnowflakeBaseResultSet.class) .getObject(1, NullableFieldsSqlData.class); assertNull(result.getString()); assertNull(result.getNullableIntValue());