hililiwei commented on a change in pull request #3689:
URL: https://github.com/apache/iceberg/pull/3689#discussion_r768266212



##########
File path: core/src/main/java/org/apache/iceberg/BaseFileScanTask.java
##########
@@ -117,7 +117,7 @@ public String toString() {
       this.offsets = ImmutableList.copyOf(offsetList);
       this.parentScanTask = parentScanTask;
       this.targetSplitSize = targetSplitSize;
-      this.splitSizes = new ArrayList<>(offsets.size());
+      this.splitSizes = Lists.newArrayListWithCapacity(offsets.size());

Review comment:
       I have fixed it, please help to check the code, thank you. @rdblue 
   
   The main reason is that 
splitSizes(BaseFileScanTask.OffsetsAwareTargetSplitSizeScanTaskIterator#splitSizes)
 is of a fixed length, as you said, in this case we should use WithCapacity. 
   
   




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

To unsubscribe, e-mail: [email protected]

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