xy2953396112 commented on a change in pull request #2241: URL: https://github.com/apache/calcite/pull/2241#discussion_r516736309
########## File path: core/src/main/java/org/apache/calcite/plan/SubstitutionVisitor.java ########## @@ -1931,6 +1931,18 @@ public static MutableRel unifyAggregates(MutableAggregate query, final List<AggregateCall> aggregateCalls = new ArrayList<>(); for (AggregateCall aggregateCall : query.aggCalls) { if (aggregateCall.isDistinct()) { + int aggIndex = aggregateCall.getArgList().get(0); Review comment: Thanks, update the code. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org