szehon-ho commented on code in PR #10020:
URL: https://github.com/apache/iceberg/pull/10020#discussion_r1635601982
##########
core/src/main/java/org/apache/iceberg/PositionDeletesTable.java:
##########
@@ -132,6 +138,35 @@ private Schema calculateSchema() {
Types.StringType.get(),
MetadataColumns.FILE_PATH_COLUMN_DOC));
+ // Calculate used ids (for de-conflict)
+ Set<Integer> currentlyUsedIds =
+
Collections.unmodifiableSet(TypeUtil.indexById(Types.StructType.of(columns)).keySet());
+ Set<Integer> usedIds =
Review Comment:
@RussellSpitzer i found another issue. In some case where I remove a
column, i did not have those originally column ids in 'usedIds'. So this adds
it.
For this to work, I massaged the Schema API to take in directly a callback
to reassign id. I think it actually simpliesi the API a bit as it removes the
concept of 'metadataIds', which was probably confusing anyway.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]