aokolnychyi commented on a change in pull request #1080:
URL: https://github.com/apache/iceberg/pull/1080#discussion_r434006671



##########
File path: core/src/main/java/org/apache/iceberg/BaseSnapshot.java
##########
@@ -120,14 +122,42 @@ public String operation() {
     return summary;
   }
 
-  @Override
-  public List<ManifestFile> manifests() {
-    if (manifests == null) {
+  private void cacheManifests() {
+    if (allManifests == null) {
       // if manifests isn't set, then the snapshotFile is set and should be 
read to get the list
-      this.manifests = ManifestLists.read(manifestList);
+      this.allManifests = ManifestLists.read(manifestList);
+    }
+
+    if (dataManifests == null) {
+      this.dataManifests = ImmutableList.copyOf(Iterables.filter(allManifests,

Review comment:
       The list of manifests can contain 1-2k entries, will iterating through 
that list twice here have an impact on performance?




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



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

Reply via email to