aokolnychyi commented on a change in pull request #1373:
URL: https://github.com/apache/iceberg/pull/1373#discussion_r477606305
##########
File path: core/src/main/java/org/apache/iceberg/TableMetadata.java
##########
@@ -598,20 +649,38 @@ public TableMetadata buildReplacement(Schema
updatedSchema, PartitionSpec update
builder.add(freshSpec);
}
+ // determine the next order id
+ int maxOrderId =
sortOrders.stream().mapToInt(SortOrder::orderId).max().orElse(INITIAL_SORT_ORDER_ID);
+ int nextOrderId = maxOrderId + 1;
Review comment:
I've matched the logic we have for `PartitionSpec`. If we have an
equivalent partition spec, we use it. I'll add a comment.
----------------------------------------------------------------
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]