vlsi commented on a change in pull request #1756: [CALCITE-1824] GROUP_ID 
returns wrong result
URL: https://github.com/apache/calcite/pull/1756#discussion_r366214662
 
 

 ##########
 File path: core/src/test/java/org/apache/calcite/test/JdbcTest.java
 ##########
 @@ -4488,6 +4488,37 @@ private void startOfGroupStep3(String startOfGroup) {
             "empid=100; deptno=10; name=Bill; salary=10000.0; 
commission=1000\n");
   }
 
+  /** Test case for
+   * <a 
href="https://issues.apache.org/jira/browse/CALCITE-1824";>[CALCITE-1824]
+   * GROUP_ID returns wrong result</a>. */
 
 Review comment:
   Would you please remove useless `test case for...` and replace it with 
something like as follows?
   
   Rewrites `group_id() ... group by grouping sets (deptno, deptno, deptno, (), 
())` into
   ```
   select 0 ... group by grouping sets (deptno, ())
   union all
   select 1 ... group by grouping sets (deptno, ())
   union all
   select 2 ... group by deptno
   ```
   ?
   
   The reason is `EnumerableAggregate(group=[{7}], groups=[[{7}, {}]]` is hard 
to understand, so the current test requires understanding of both `grouping 
sets` and `EnumerableAggregate`.

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


With regards,
Apache Git Services

Reply via email to