wypoon commented on code in PR #10935:
URL: https://github.com/apache/iceberg/pull/10935#discussion_r1767624705


##########
core/src/test/java/org/apache/iceberg/TestBaseIncrementalChangelogScan.java:
##########
@@ -132,6 +131,175 @@ public void testFileDeletes() {
     assertThat(t1.existingDeletes()).as("Must be no deletes").isEmpty();
   }
 
+  @TestTemplate
+  public void testRowDeletes() {
+    assumeThat(formatVersion).isEqualTo(2);
+
+    table
+        .newFastAppend()
+        .appendFile(FILE_A)
+        .appendFile(FILE_A2)
+        .appendFile(FILE_B)
+        .appendFile(FILE_C)
+        .commit();
+    Snapshot snap1 = table.currentSnapshot();
+
+    // position delete
+    table.newRowDelta().addDeletes(FILE_B_DELETES).commit();
+    Snapshot snap2 = table.currentSnapshot();
+
+    // equality delete
+    table.newRowDelta().addDeletes(FILE_C2_DELETES).commit();
+    Snapshot snap3 = table.currentSnapshot();
+
+    // mix of position and equality deletes
+    
table.newRowDelta().addDeletes(FILE_A_DELETES).addDeletes(FILE_A2_DELETES).commit();

Review Comment:
   Ah, you mean compaction as in rewriting data files.
   In this case, compaction does not result in any inserts or deletes. (I 
believe this is what we both expect.) Please see `testDataRewritesAreIgnored` 
that I added in `TestChangelogTable` in this PR. This test is in 
spark-extensions because I want to call the rewrite_data_files Spark procedure.
   
   (Note that in that test, there is a snapshot between `snap2` and `snap3`, 
namely the snapshot where the rewrite_data_files is committed, but I don't 
capture it, because no change for it shows up in the changelog (which is the 
point). In `snap3`, another delete occurs, and that shows up in the changelog.)



-- 
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