julianhyde commented on code in PR #4328:
URL: https://github.com/apache/calcite/pull/4328#discussion_r2060698531
##########
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:
Point taken about reallocations. Although they are N log N worst case.
It's also important that simple code should look simple. This line of code
will never be a performance bug.
--
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]