chunweilei commented on a change in pull request #2241:
URL: https://github.com/apache/calcite/pull/2241#discussion_r517086483



##########
File path: core/src/main/java/org/apache/calcite/plan/SubstitutionVisitor.java
##########
@@ -1931,6 +1931,22 @@ public static MutableRel 
unifyAggregates(MutableAggregate query,
       final List<AggregateCall> aggregateCalls = new ArrayList<>();
       for (AggregateCall aggregateCall : query.aggCalls) {
         if (aggregateCall.isDistinct()) {
+          if (aggregateCall.getArgList().size() == 1) {
+            int aggIndex = aggregateCall.getArgList().get(0);
+            if (target.groupSet.asSet().contains(aggIndex)) {

Review comment:
       Could you please clarify why the size of the arguments has to be 1?




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


Reply via email to