You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "nastra (via GitHub)" <gi...@apache.org> on 2026/02/03 09:14:54 UTC

Re: [PR] Fix "AlreadyExistsException: Location already exists" at rewrite_table_path [iceberg]

nastra commented on code in PR #14859:
URL: https://github.com/apache/iceberg/pull/14859#discussion_r2758051816


##########
spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteTablePathsAction.java:
##########
@@ -565,6 +565,83 @@ public void testPositionDeletesAcrossFiles() throws Exception {
         .isEmpty();
   }
 
+  /**
+   * Test for https://github.com/apache/iceberg/issues/14814
+   *
+   * <p>When multiple tags/refs point to the same snapshot containing positional deletes, the
+   * rewrite_table_path action was throwing AlreadyExistsException because the same delete file was
+   * being processed multiple times. The fix uses DeleteFileSet to properly deduplicate delete files
+   * based on file location, content offset, and content size.
+   */
+  @TestTemplate
+  public void testPositionDeletesWithMultipleTagsOnSameSnapshot() throws Exception {

Review Comment:
   the test still passes for me without applying the fix



-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org