stevenzwu commented on code in PR #11868:
URL: https://github.com/apache/iceberg/pull/11868#discussion_r2179187784


##########
core/src/main/java/org/apache/iceberg/PartitionSpecParser.java:
##########
@@ -68,7 +68,7 @@ public static String toJson(UnboundPartitionSpec spec, 
boolean pretty) {
   }
 
   public static PartitionSpec fromJson(Schema schema, JsonNode json) {
-    return fromJson(json).bind(schema);
+    return fromJson(json).bindUnchecked(schema);

Review Comment:
   > It's unfortunately a bit more complicated but should we have a 
checkCompatibilityIgnoringMissing and a buildIgnoringMissingFields which just 
does the same checks as checkCompatibility but essentially ignoring if a ifeld 
is missing, and if it is defined we still do the existing checks?
   
   this seems like a reasonable approach. We can also just add a boolean arg to 
the `checkCompatibility` method. it is a non-public method.
   
   We still need the strict check of source field for the code path of 
`TableMetadata.addPartitionSpecInternal`.



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