Skip to content

Commit

Permalink
Fix japicmp
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-dheyman committed Apr 2, 2024
1 parent 3ec0b41 commit 2b490b5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
4 changes: 3 additions & 1 deletion src/main/java/net/snowflake/client/core/SFBaseResultSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ public abstract class SFBaseResultSet {

public abstract Object getObject(int columnIndex) throws SFException;

public abstract Array getArray(int columnIndex) throws SFException;
public Array getArray(int columnIndex) throws SFException {
throw new UnsupportedOperationException();
}

public abstract BigDecimal getBigDecimal(int columnIndex) throws SFException;

Expand Down
3 changes: 3 additions & 0 deletions src/main/java/net/snowflake/client/core/SFJsonResultSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ public abstract class SFJsonResultSet extends SFBaseResultSet {

protected final Converters converters;

@Deprecated protected final TimeZone sessionTimeZone;

protected SFJsonResultSet(TimeZone sessionTimeZone, Converters converters) {
this.sessionTimeZone = sessionTimeZone;
this.sessionTimezone = sessionTimeZone;
this.converters = converters;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
@SnowflakeJdbcInternalApi
public class StructureTypeHelper {
private static final String STRUCTURED_TYPE_ENABLED_PROPERTY_NAME = "STRUCTURED_TYPE_ENABLED";
private static boolean structuredTypeEnabled = true;
private static boolean structuredTypeEnabled =
Boolean.valueOf(System.getProperty(STRUCTURED_TYPE_ENABLED_PROPERTY_NAME));

public static boolean isStructureTypeEnabled() {
return structuredTypeEnabled;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1550,12 +1550,8 @@ public <T> Map<String, T> getMap(int columnIndex, Class<T> type) throws SQLExcep
int scale = valueFieldMetadata.getScale();
TimeZone tz = sfBaseResultSet.getSessionTimeZone();
Object object = getObject(columnIndex);
Map<String, Object> map;
if (object instanceof JsonSqlInput) {
map = mapSFExceptionToSQLException(() -> prepareMapWithValues(object, type));
} else {
map = (Map<String, Object>) object;
}
Map<String, Object> map =
mapSFExceptionToSQLException(() -> prepareMapWithValues(object, type));
Map<String, T> resultMap = new HashMap<>();
for (Map.Entry<String, Object> entry : map.entrySet()) {
if (SQLData.class.isAssignableFrom(type)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class ResultSetStructuredTypesLatestIT extends BaseJDBCTest {
private final ResultSetFormatType queryResultFormat;

public ResultSetStructuredTypesLatestIT() {
this(ResultSetFormatType.NATIVE_ARROW);
this(ResultSetFormatType.JSON);
}

protected ResultSetStructuredTypesLatestIT(ResultSetFormatType queryResultFormat) {
Expand Down

0 comments on commit 2b490b5

Please sign in to comment.