jackye1995 commented on a change in pull request #2354:
URL: https://github.com/apache/iceberg/pull/2354#discussion_r600946368
##########
File path: core/src/main/java/org/apache/iceberg/TableMetadata.java
##########
@@ -111,6 +117,11 @@ static TableMetadata newTableMetadata(Schema schema,
int freshSortOrderId = sortOrder.isUnsorted() ? sortOrder.orderId() :
INITIAL_SORT_ORDER_ID;
SortOrder freshSortOrder = freshSortOrder(freshSortOrderId, freshSchema,
sortOrder);
+ // rebuild the row identifier using the new column ids
+ int freshRowIdentifierVersion = rowIdentifier.isNotIdentified() ?
+ rowIdentifier.rowIdVersion() : INITIAL_ROW_IDENTIFIER_VERSION;
Review comment:
Yes, because not identified is default that has ID 0. Otherwise the row
key should have ID 1 in this method, and then get merged with current metadata
in create/replace table transaction.
--
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]