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'. This led to 
some case where I re-assigned an id to a deleted column id, and for old files 
with that column, I saw bad behavior when it came to pruning. This is the fix.
   
   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: 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

Reply via email to