yyanyy commented on a change in pull request #2089:
URL: https://github.com/apache/iceberg/pull/2089#discussion_r560516987
##########
File path: core/src/main/java/org/apache/iceberg/TableMetadataParser.java
##########
@@ -288,6 +292,9 @@ static TableMetadata fromJson(FileIO io, InputFile file,
JsonNode node) {
schema, TableMetadata.INITIAL_SPEC_ID, node.get(PARTITION_SPEC)));
}
+ int lastAssignedFieldId =
Optional.ofNullable(JsonUtil.getIntOrNull(LAST_ASSIGNED_FIELD_ID, node))
+ .orElseGet(() ->
specs.stream().mapToInt(PartitionSpec::lastAssignedFieldId).max().orElse(999));
Review comment:
Do we want it to be a required field in v2 and fail validation if it's
missing?
----------------------------------------------------------------
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]