jun-he commented on a change in pull request #2956:
URL: https://github.com/apache/iceberg/pull/2956#discussion_r685708978



##########
File path: core/src/main/java/org/apache/iceberg/BaseUpdatePartitionSpec.java
##########
@@ -69,7 +69,7 @@
     this.schema = spec.schema();
     this.nameToField = indexSpecByName(spec);
     this.transformToField = indexSpecByTransform(spec);
-    this.lastAssignedPartitionId = base.lastAssignedPartitionId();
+    this.lastAssignedPartitionId = formatVersion == 1 ? 
spec.lastAssignedFieldId() : base.lastAssignedPartitionId();

Review comment:
       For v1 table, `lastAssignedFieldId` might be missing in metadata JSON 
but the library including `BaseUpdatePartitionSpec` feature (for either v1 or 
v2) will still generate it by deriving it from the specs based on the above 
logic when loading JSON. So I am wondering if there is any case or tests 
showing that `lastAssignedFieldId` is unset in the loaded table metadata.
   




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