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


##########
core/src/test/java/org/apache/iceberg/TestRemoveSnapshots.java:
##########
@@ -1705,6 +1706,36 @@ public void testRemoveSpecsDoesntRemoveDefaultSpec() 
throws IOException {
         .containsExactly(dataBucketSpec.specId());
   }
 
+  @TestTemplate
+  public void testRemoveSchemas() {
+    table.newAppend().appendFile(FILE_A).commit();
+
+    Set<String> expectedDeletedFiles = Sets.newHashSet();
+    expectedDeletedFiles.add(table.currentSnapshot().manifestListLocation());
+
+    table.updateSchema().addColumn("extra_col1", 
Types.StringType.get()).commit();
+
+    table.newAppend().appendFile(FILE_B).commit();
+    expectedDeletedFiles.add(table.currentSnapshot().manifestListLocation());
+
+    table.updateSchema().addColumn("extra_col2", 
Types.LongType.get()).deleteColumn("id").commit();
+
+    table.newAppend().appendFile(FILE_A2).commit();
+
+    assertThat(table.schemas().size()).isEqualTo(3);
+
+    Set<String> deletedFiles = Sets.newHashSet();
+    // Expire all snapshots except the current one. Also expire all schemas 
except the current one.

Review Comment:
   ```suggestion
       // Expire all snapshots/schemas except the current one
   ```



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