rdblue commented on a change in pull request #2089:
URL: https://github.com/apache/iceberg/pull/2089#discussion_r567152525
##########
File path: core/src/main/java/org/apache/iceberg/TableMetadataParser.java
##########
@@ -288,6 +292,14 @@ static TableMetadata fromJson(FileIO io, InputFile file,
JsonNode node) {
schema, TableMetadata.INITIAL_SPEC_ID, node.get(PARTITION_SPEC)));
}
+ int lastAssignedFieldId;
+ if (formatVersion > 1) {
+ lastAssignedFieldId = JsonUtil.getInt(LAST_ASSIGNED_FIELD_ID, node);
Review comment:
Should this use a precondition to check that the last assigned partition
ID is present? That would result in a better error message if it is missing,
like the other cases: `last-assigned-partition-id must exist in format v2`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]