amogh-jahagirdar commented on code in PR #10150:
URL: https://github.com/apache/iceberg/pull/10150#discussion_r1578433465


##########
core/src/test/java/org/apache/iceberg/TestOverwrite.java:
##########
@@ -295,5 +343,6 @@ public void testValidatedOverwriteWithAppendSuccess() {
         .hasMessageStartingWith("Cannot append file with rows that do not 
match filter");
 
     assertThat(latestSnapshot(base, branch).snapshotId()).isEqualTo(baseId);
+    assertThat(latestSnapshot(table, 
branch).operation()).isEqualTo(DataOperations.APPEND);

Review Comment:
   Shouldn't this case be an overwrite? Since we'd be removing files which 
match the filter in `overwriteByRowFilter`?



##########
core/src/test/java/org/apache/iceberg/TestOverwrite.java:
##########
@@ -135,6 +135,49 @@ public void createTestTable() throws IOException {
     commit(table, 
table.newAppend().appendFile(FILE_0_TO_4).appendFile(FILE_5_TO_9), branch);
   }
 
+  @TestTemplate
+  public void deleteDataFilesProducesDeleteOperation() {
+    OverwriteFiles overwriteFiles = 
table.newOverwrite().deleteFile(FILE_A).deleteFile(FILE_B);
+
+    commit(table, overwriteFiles, branch);
+    Snapshot snap = latestSnapshot(table, branch);

Review Comment:
   Nit: I guess you could just inline snap on 144



##########
core/src/test/java/org/apache/iceberg/TestOverwrite.java:
##########
@@ -295,5 +343,6 @@ public void testValidatedOverwriteWithAppendSuccess() {
         .hasMessageStartingWith("Cannot append file with rows that do not 
match filter");
 
     assertThat(latestSnapshot(base, branch).snapshotId()).isEqualTo(baseId);
+    assertThat(latestSnapshot(table, 
branch).operation()).isEqualTo(DataOperations.APPEND);

Review Comment:
   Oh I see the overwrite fails, is this assertion just for verifying what the 
operation is for the table that's setup for the tests (the append that's done 
in the BeforeEach)? If so I'd maybe just leave that assertion out (and we can 
make sure the tests for AppendFiles properly verifies the operation).



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