korlov42 commented on a change in pull request #8738:
URL: https://github.com/apache/ignite/pull/8738#discussion_r568384541



##########
File path: 
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/exp/agg/Accumulators.java
##########
@@ -281,7 +281,10 @@
 
         /** {@inheritDoc} */
         @Override public void add(Object... args) {
-            cnt++;
+            assert F.isEmpty(args) || args.length == 1;

Review comment:
       COUNT could work in two modes: count a whole row (COUNT(*), COUNT(1)), 
and count a particular column in the row (COUNT(col_name)). In the first case 
the `args` will be empty, and it's OK, since we are not interested in 
particular columns, only fact that there is a row matters. In the second case 
we expect a value derived from the current row, and there must be only one such 
value for each row.




----------------------------------------------------------------
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:
[email protected]


Reply via email to