RussellSpitzer commented on code in PR #10020: URL: https://github.com/apache/iceberg/pull/10020#discussion_r1636890810
########## 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 = + table().schemas().values().stream() + .map(currSchema -> TypeUtil.indexById(currSchema.asStruct()).keySet()) + .reduce(currentlyUsedIds, Sets::union); + + // Calculate ids to reassign + Set<Integer> idsToReassign = Review Comment: Probably can drop the identical version of this you store as metadataIds on 142 -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org