rdblue commented on a change in pull request #814: Update RemoveSnapshots to protect cherry-picked data. URL: https://github.com/apache/incubator-iceberg/pull/814#discussion_r382711003
########## File path: core/src/test/java/org/apache/iceberg/TestRemoveSnapshots.java ########## @@ -387,4 +393,55 @@ public void dataFilesCleanup() throws IOException { Assert.assertTrue("FILE_A should be deleted", deletedFiles.contains(FILE_A.path().toString())); Assert.assertTrue("FILE_B should be deleted", deletedFiles.contains(FILE_B.path().toString())); } + @Test + public void testWithExpiringWapThenCherrypick() { + // first WAP commit + table.newAppend() + .appendFile(FILE_B) + .stageOnly() + .commit(); + + TableMetadata base = readMetadata(); + // pick the snapshot that's staged but not committed + Snapshot wap1Snapshot = base.snapshots().get(0); Review comment: This shouldn't use the name `wap`, since this is independent of the WAP pattern. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org