Prathameshk2696 commented on code in PR #18624:
URL: https://github.com/apache/iceberg/pull/18624#discussion_r4408857219


##########
core/src/test/java/org/apache/iceberg/TestRemoveSnapshots.java:
##########
@@ -110,6 +113,57 @@ public void testExpireOlderThan() {
     
assertThat(deletedFiles).containsExactly(firstSnapshot.manifestListLocation());
   }
 
+  @TestTemplate
+  public void expireOlderThanWithNullSummaryOnSurvivingAncestor() throws 
IOException {
+    assumeThat(incrementalCleanup).isTrue();
+
+    table.newAppend().appendFile(FILE_A).commit();
+    Snapshot firstSnapshot = table.currentSnapshot();
+
+    waitUntilAfter(firstSnapshot.timestampMillis());
+
+    table.newAppend().appendFile(FILE_B).commit();
+    Snapshot secondSnapshot = table.currentSnapshot();
+    addSnapshotWithoutSummary(secondSnapshot.snapshotId());
+    assertThat(table.snapshot(secondSnapshot.snapshotId()).summary()).isNull();
+
+    long tAfterSecondCommit = 
waitUntilAfter(table.currentSnapshot().timestampMillis());
+
+    Set<String> deletedFiles = Sets.newHashSet();
+
+    removeSnapshots(table)
+        .expireOlderThan(tAfterSecondCommit)

Review Comment:
   Dropped the tests as suggested in 
https://github.com/apache/iceberg/pull/18624#discussion_r4391729734.



##########
core/src/test/java/org/apache/iceberg/TestRemoveSnapshots.java:
##########
@@ -110,6 +113,57 @@ public void testExpireOlderThan() {
     
assertThat(deletedFiles).containsExactly(firstSnapshot.manifestListLocation());
   }
 
+  @TestTemplate
+  public void expireOlderThanWithNullSummaryOnSurvivingAncestor() throws 
IOException {
+    assumeThat(incrementalCleanup).isTrue();
+
+    table.newAppend().appendFile(FILE_A).commit();
+    Snapshot firstSnapshot = table.currentSnapshot();
+
+    waitUntilAfter(firstSnapshot.timestampMillis());
+
+    table.newAppend().appendFile(FILE_B).commit();
+    Snapshot secondSnapshot = table.currentSnapshot();
+    addSnapshotWithoutSummary(secondSnapshot.snapshotId());
+    assertThat(table.snapshot(secondSnapshot.snapshotId()).summary()).isNull();
+
+    long tAfterSecondCommit = 
waitUntilAfter(table.currentSnapshot().timestampMillis());
+
+    Set<String> deletedFiles = Sets.newHashSet();
+
+    removeSnapshots(table)
+        .expireOlderThan(tAfterSecondCommit)
+        .deleteWith(deletedFiles::add)
+        .commit();
+
+    assertThat(table.snapshot(firstSnapshot.snapshotId())).isNull();
+    assertThat(table.snapshot(secondSnapshot.snapshotId())).isNotNull();
+    
assertThat(deletedFiles).containsExactly(firstSnapshot.manifestListLocation());
+  }
+
+  @TestTemplate
+  public void expireOlderThanWithNullSummaryOnExpiredAncestor() throws 
IOException {

Review Comment:
   Dropped the tests as suggested in 
https://github.com/apache/iceberg/pull/18624#discussion_r4391729734.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to