aokolnychyi commented on a change in pull request #546: Use Java collections in 
GenericDataFile to fix Kryo serialization
URL: https://github.com/apache/incubator-iceberg/pull/546#discussion_r334684682
 
 

 ##########
 File path: core/src/main/java/org/apache/iceberg/DataFiles.java
 ##########
 @@ -334,4 +338,10 @@ public DataFile build() {
           keyMetadata, splitOffsets);
     }
   }
+
+  private static <E> List<E> copyList(List<E> toCopy) {
+    List<E> copy = Lists.newArrayListWithExpectedSize(toCopy.size());
+    copy.addAll(toCopy);
+    return copy;
 
 Review comment:
   `GenericDataFile` also wraps the list into `Collections.unmodifiableList`. 
Does it make sense here?

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

Reply via email to