Skip to content

Commit

Permalink
add check for array type
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-mkubik committed Jan 9, 2025
1 parent 624c564 commit f22d07d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -597,9 +597,11 @@ private StructObjectWrapper getObjectRepresentation(int columnIndex, boolean wit
if (type == Types.STRUCT) {
JsonSqlInput jsonSqlInput = createJsonSqlInput(columnIndex, obj);
return new StructObjectWrapper(jsonSqlInput.getText(), jsonSqlInput);
} else {
} else if (type == Types.ARRAY) {
SfSqlArray sfArray = getJsonArray((String) obj, columnIndex);
return new StructObjectWrapper(sfArray.getText(), sfArray);
} else {
throw new SFException(queryId, ErrorCode.INVALID_STRUCT_DATA);
}
} else if (converter instanceof StructConverter) {
String jsonString = withString ? converter.toString(index) : null;
Expand Down

0 comments on commit f22d07d

Please sign in to comment.