nastra commented on code in PR #6934:
URL: https://github.com/apache/iceberg/pull/6934#discussion_r1184613105
##########
core/src/main/java/org/apache/iceberg/util/JsonUtil.java:
##########
@@ -173,6 +176,18 @@ public static String getStringOrNull(String property,
JsonNode node) {
return getString(property, node);
}
+ public static ByteBuffer getByteBufferOrNull(String property, JsonNode node)
{
+ if (!node.has(property) || node.get(property).isNull()) {
+ return null;
+ }
+
+ JsonNode pNode = node.get(property);
+ Preconditions.checkArgument(
+ pNode.isTextual(), "Cannot parse from non-text value: %s: %s",
property, pNode);
Review Comment:
nit: maybe we should mention that we're trying to parse this from text to a
binary representation
--
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]