Fokko commented on code in PR #5287:
URL: https://github.com/apache/iceberg/pull/5287#discussion_r922890029


##########
core/src/main/java/org/apache/iceberg/SchemaParser.java:
##########
@@ -254,8 +254,8 @@ private static Types.MapType mapFromJson(JsonNode json) {
   }
 
   public static Schema fromJson(JsonNode json) {
-    Type type  = typeFromJson(json);
-    Preconditions.checkArgument(type.isNestedType() && 
type.asNestedType().isStructType(),
+    Type type = typeFromJson(json);
+    Preconditions.checkArgument(type != null && type.isNestedType() && 
type.asNestedType().isStructType(),

Review Comment:
   Ah since the Python changes are related, I figured it would make sense to do 
it in a single PR. I just created https://github.com/apache/iceberg/pull/5291 
for the Java change.



-- 
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]

Reply via email to