You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/09/06 14:06:26 UTC

[GitHub] [iceberg] Fokko commented on a diff in pull request #5707: Core: Only validate the current partition specs

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


##########
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:
   @singhpk234 Can you elaborate a bit more? I'm not sure that I understand the issue.
   
   For V1, using the `spec` instead of `specs`, nothing changes. Since it takes the other branch: https://github.com/apache/iceberg/blob/24d5a53a0f90b47203eb3b93b0d141e154c36abe/core/src/main/java/org/apache/iceberg/TableMetadataParser.java#L393-L402
   
   



-- 
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-unsubscribe@iceberg.apache.org

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


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