kbendick commented on a change in pull request #4036:
URL: https://github.com/apache/iceberg/pull/4036#discussion_r799861129
##########
File path: core/src/main/java/org/apache/iceberg/util/JsonUtil.java
##########
@@ -65,6 +67,16 @@ public static Integer getIntOrNull(String property, JsonNode
node) {
return pNode.asInt();
}
+ public static Long getLongOrNull(String property, JsonNode node) {
+ if (!node.has(property)) {
+ return null;
+ }
+ JsonNode pNode = node.get(property);
+ Preconditions.checkArgument(pNode != null && !pNode.isNull() &&
pNode.isIntegralNumber() &&
+ pNode.canConvertToLong(), "Cannot parse %s from non-string value: %s",
property, pNode);
Review comment:
Yeah I would say `"Cannot parse %s to a long value: %s", property,
pNode)`;
--
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]