lowka commented on code in PR #2443:
URL: https://github.com/apache/ignite-3/pull/2443#discussion_r1298584017


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/rel/AbstractSetOpNode.java:
##########
@@ -195,31 +196,32 @@ private void flush() throws Exception {
     }
 
     /**
-     * Grouping.
-     * TODO Documentation https://issues.apache.org/jira/browse/IGNITE-15859
+     * Grouping provides base driver code to implement a set operator.
+     * The basic idea is to store the number of distinct rows per input set 
and use these numbers to calculate
+     * the number of rows an operator should produce.
      */
     protected abstract static class Grouping<RowT> {
         protected final Map<GroupKey, int[]> groups = new HashMap<>();
 
-        protected final RowHandler<RowT> hnd;
-
         protected final AggregateType type;
 
         protected final boolean all;
 
         protected final RowFactory<RowT> rowFactory;
 
-        /** Processed rows count in current set. */
-        protected int rowsCnt = 0;
+        private final RowHandler<RowT> hnd;
 
-        protected Grouping(ExecutionContext<RowT> ctx, RowFactory<RowT> 
rowFactory, AggregateType type, boolean all) {
+        private final int columnNum;
+
+        protected Grouping(ExecutionContext<RowT> ctx, RowFactory<RowT> 
rowFactory,  int columnNum, AggregateType type, boolean all) {

Review Comment:
   Fixed.



##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/rel/AbstractSetOpNode.java:
##########
@@ -195,31 +196,32 @@ private void flush() throws Exception {
     }
 
     /**
-     * Grouping.
-     * TODO Documentation https://issues.apache.org/jira/browse/IGNITE-15859
+     * Grouping provides base driver code to implement a set operator.
+     * The basic idea is to store the number of distinct rows per input set 
and use these numbers to calculate

Review Comment:
   Fixed.



##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItSetOpTest.java:
##########
@@ -270,4 +306,27 @@ private static void createTable(String tableName) {
     private <T> long countIf(Iterable<T> it, Predicate<T> pred) {
         return StreamSupport.stream(it.spliterator(), 
false).filter(pred).count();
     }
+
+    private static List<List<Object>> setSql(SetOpVariant setOp, String sql) {

Review Comment:
   Fixed.



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

Reply via email to