rdblue commented on a change in pull request #718: Update projection in 
addedFiles to support appending
URL: https://github.com/apache/incubator-iceberg/pull/718#discussion_r361720568
 
 

 ##########
 File path: core/src/test/java/org/apache/iceberg/TestFastAppend.java
 ##########
 @@ -277,4 +278,27 @@ public void testRecoveryWithoutManifestList() {
     Assert.assertTrue("Should commit the same new manifest",
         metadata.currentSnapshot().manifests().contains(newManifest));
   }
+
+  @Test
+  public void testAppendFilesFromTable() {
+    table.newFastAppend()
+        .appendFile(FILE_A)
+        .appendFile(FILE_B)
+        .commit();
+
+    // collect data files from deserialization
+    Iterator<DataFile> filesIterator = 
table.currentSnapshot().addedFiles().iterator();
+
+    table.newDelete().deleteFile(FILE_A).deleteFile(FILE_B).commit();
+
+    Snapshot oldSnapshot = table.currentSnapshot();
+
+    AppendFiles fastAppend = table.newFastAppend();
+    while (filesIterator.hasNext()) {
 
 Review comment:
   Why not use `for (DataFile file : table.currentSnapshot().addedFiles())`? 
Using a while loop and an explicit iterator seems odd.

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


With regards,
Apache Git Services

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

Reply via email to