zstan commented on code in PR #4328:
URL: https://github.com/apache/calcite/pull/4328#discussion_r2059696142
##########
core/src/main/java/org/apache/calcite/plan/RelOptUtil.java:
##########
@@ -991,7 +991,7 @@ public static RelNode createSingleValueAggRel(
RelOptCluster cluster,
RelNode rel) {
final int aggCallCnt = rel.getRowType().getFieldCount();
- final List<AggregateCall> aggCalls = new ArrayList<>();
+ final List<AggregateCall> aggCalls = new ArrayList<>(aggCallCnt);
Review Comment:
I think it\`s a good practice to define collection sizes if it`s possible to
avoid excessive pre-allocations, thus i prefer to store it as is.
--
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]