openinx commented on a change in pull request #2349:
URL: https://github.com/apache/iceberg/pull/2349#discussion_r601017528
##########
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:
I think you are saying that we don't have to convert the `partitions`
array to a list then copy it again , and convert it back to `partitions` array
in the end ( if use the `copyList` approach`).
Yes, I agree.
--
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]