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 2021/03/24 19:44:57 UTC

[GitHub] [iceberg] rdblue commented on a change in pull request #2349: Flink: Fix the manifest kryo serialization issue.

rdblue commented on a change in pull request #2349:
URL: https://github.com/apache/iceberg/pull/2349#discussion_r600824358



##########
File path: core/src/main/java/org/apache/iceberg/GenericManifestFile.java
##########
@@ -145,7 +145,12 @@ private GenericManifestFile(GenericManifestFile toCopy) {
     this.existingRowsCount = toCopy.existingRowsCount;
     this.deletedFilesCount = toCopy.deletedFilesCount;
     this.deletedRowsCount = toCopy.deletedRowsCount;
-    this.partitions = copyList(toCopy.partitions, PartitionFieldSummary::copy);
+    if (toCopy.partitions != null) {
+      this.partitions = copyList(toCopy.partitions(), PartitionFieldSummary::copy)
+          .toArray(new PartitionFieldSummary[0]);

Review comment:
       Do we need to use `copyList`? What about using a Stream instead?
   
   ```java
   Streams.of(toCopy.partitions).map(PartitionFieldSummary::copy).toArray(PartitionFieldSummary[]::new);
   ```




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



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