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 2019/08/01 03:40:34 UTC

[GitHub] [incubator-iceberg] rdblue commented on a change in pull request #341: Improve filtering in Snapshot#addedFiles.

rdblue commented on a change in pull request #341: Improve filtering in Snapshot#addedFiles.
URL: https://github.com/apache/incubator-iceberg/pull/341#discussion_r309512108
 
 

 ##########
 File path: core/src/main/java/org/apache/iceberg/ManifestReader.java
 ##########
 @@ -161,16 +161,20 @@ private void cacheChanges() {
     List<ManifestEntry> adds = Lists.newArrayList();
     List<ManifestEntry> deletes = Lists.newArrayList();
 
-    for (ManifestEntry entry : entries(fileSchema.select(CHANGE_COLUNNS))) {
-      switch (entry.status()) {
-        case ADDED:
-          adds.add(entry.copyWithoutStats());
-          break;
-        case DELETED:
-          deletes.add(entry.copyWithoutStats());
-          break;
-        default:
+    try (CloseableIterable<ManifestEntry> entries = entries(fileSchema.select(CHANGE_COLUNNS))) {
 
 Review comment:
   The intent is the same as for Snapshot: to make the added and deleted files easily accessible. Manifests are `Iterable<DataFile>`, and don't expose the internal `ManifestEntry` data. That means we need to make the added and deleted files accessible through the API somehow.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org