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



##########
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:
       It looks like most cases in this PR convert to `WithCapacity`, but we 
typically only use that when we know that the number of elements won't exceed 
the given size. Otherwise, we use `WithExpectedSize` to allocate some 
additional space. I think you have that guarantee/expectation here, but if 
you're converting to one or the other, I'd convert to `WithExpectedSize`.




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