RussellSpitzer commented on a change in pull request #1373:
URL: https://github.com/apache/iceberg/pull/1373#discussion_r476614552
##########
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:
This block of changes 652 -668 Is confusing to me, could add some more
comments? I'm mostly confused about when we add "freshSortOrder" , it looks
like we ignore it entirely if an equivalent SortOrder is there?
----------------------------------------------------------------
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]