singhpk234 commented on code in PR #5707:
URL: https://github.com/apache/iceberg/pull/5707#discussion_r962873713


##########
core/src/main/java/org/apache/iceberg/TableMetadataParser.java:
##########
@@ -380,7 +380,12 @@ static TableMetadata fromJson(FileIO io, String 
metadataLocation, JsonNode node)
       // parse the spec array
       ImmutableList.Builder<PartitionSpec> builder = ImmutableList.builder();
       for (JsonNode spec : specArray) {
-        builder.add(PartitionSpecParser.fromJson(schema, spec));
+        UnboundPartitionSpec unboundSpec = PartitionSpecParser.fromJson(spec);
+        if (unboundSpec.specId() == defaultSpecId) {
+          builder.add(unboundSpec.bind(schema));

Review Comment:
   [doubt] as per my understanding, I think this might not work with v1 
partition spec considering we still have `void` transform for dropped 
partitions, which would be holding reference to dropped source field. 
   
   Should we update `PartitionSpec#checkCompatibility` to handle void 
transforms. Thoughts ?



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