nastra commented on code in PR #16586:
URL: https://github.com/apache/iceberg/pull/16586#discussion_r3316084166
##########
core/src/main/java/org/apache/iceberg/util/JsonUtil.java:
##########
@@ -272,7 +272,10 @@ public static String[] getStringArray(JsonNode node) {
ArrayNode arrayNode = (ArrayNode) node;
String[] arr = new String[arrayNode.size()];
for (int i = 0; i < arr.length; i++) {
- arr[i] = arrayNode.get(i).asText();
+ JsonNode element = arrayNode.get(i);
+ Preconditions.checkArgument(
+ element.isTextual(), "Cannot parse string from non-text value: %s",
element);
Review Comment:
yes that would work as well
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]