nastra commented on code in PR #9952:
URL: https://github.com/apache/iceberg/pull/9952#discussion_r1524575987


##########
core/src/main/java/org/apache/iceberg/util/JsonUtil.java:
##########
@@ -206,6 +207,25 @@ public static Map<String, String> getStringMap(String 
property, JsonNode node) {
     return builder.build();
   }
 
+  public static Map<String, String> getStringMapNullableValues(String 
property, JsonNode node) {
+    Preconditions.checkArgument(node.has(property), "Cannot parse missing map: 
%s", property);
+    JsonNode pNode = node.get(property);
+    Preconditions.checkArgument(
+        pNode != null && !pNode.isNull() && pNode.isObject(),
+        "Cannot parse string map from non-object value: %s: %s",
+        property,
+        pNode);
+
+    Map<String, String> map = Maps.newHashMap();

Review Comment:
   can't use ImmutableMap here as it doesn't support null values



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to