hililiwei commented on a change in pull request #3689:
URL: https://github.com/apache/iceberg/pull/3689#discussion_r767094121
##########
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:
Thank you for your comments. I think what you said is reasonable. When I
am modifying the relevant code, I also hesitate to use which method to replace.
Later, I saw a description on this method:
> Note: This method will soon be deprecated. Even in the rare case that you
do want some amount of padding, it's best if you choose your desired amount
explicitly.
This prompted me to use withcapacity, If use withexpectedsize a lot, will
it cause unnecessary waste of resources?
thx.

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