You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/02/18 19:51:42 UTC

[GitHub] [iceberg] szehon-ho commented on a change in pull request #4141: Add unit test for ExpireSnapshot with DeleteFile

szehon-ho commented on a change in pull request #4141:
URL: https://github.com/apache/iceberg/pull/4141#discussion_r810299028



##########
File path: spark/v3.2/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestExpireSnapshotsProcedure.java
##########
@@ -224,4 +235,62 @@ public void testConcurrentExpireSnapshotsWithInvalidInput() {
             catalogName, tableIdent, -1));
 
   }
+
+  @Test
+  public void testExpireDeleteFiles() throws Exception {
+    sql("CREATE TABLE %s (id bigint NOT NULL, data string) USING iceberg TBLPROPERTIES" +
+        "('format-version'='2', 'write.delete.mode'='merge-on-read')", tableName);
+
+    sql("INSERT INTO TABLE %s VALUES (1, 'a'), (2, 'b'), (3, 'c'), (4, 'd')", tableName);
+    sql("DELETE FROM %s WHERE id=1", tableName);
+
+    Table table = validationCatalog.loadTable(tableIdent);
+    table.refresh();

Review comment:
       Removed

##########
File path: spark/v3.2/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestExpireSnapshotsProcedure.java
##########
@@ -224,4 +235,62 @@ public void testConcurrentExpireSnapshotsWithInvalidInput() {
             catalogName, tableIdent, -1));
 
   }
+
+  @Test
+  public void testExpireDeleteFiles() throws Exception {
+    sql("CREATE TABLE %s (id bigint NOT NULL, data string) USING iceberg TBLPROPERTIES" +
+        "('format-version'='2', 'write.delete.mode'='merge-on-read')", tableName);
+
+    sql("INSERT INTO TABLE %s VALUES (1, 'a'), (2, 'b'), (3, 'c'), (4, 'd')", tableName);
+    sql("DELETE FROM %s WHERE id=1", tableName);
+
+    Table table = validationCatalog.loadTable(tableIdent);

Review comment:
       Done




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