nielspardon commented on code in PR #3703:
URL: https://github.com/apache/calcite/pull/3703#discussion_r1501082800


##########
core/src/main/java/org/apache/calcite/tools/RelBuilder.java:
##########
@@ -2510,7 +2510,7 @@ private RelBuilder aggregate_(GroupKeyImpl groupKey,
     // duplicates, then add a Project.
     final Set<AggregateCall> callSet = new HashSet<>();
     final PairList<Integer, @Nullable String> projects = PairList.of();
-    Util.range(groupSet.cardinality())
+    Util.range(groupSet2.cardinality())

Review Comment:
   From my understanding the return value of `groupSet.cardinality()` should 
always be the same as for `groupSet2.cardinality()` in the current 
implementation. My main point is that with all the logic at the beginning of 
the `aggregate_()` method which introduces `groupSet2` we should use it 
consistently in the latter part of the method.



-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to