abhishekagarwal87 commented on a change in pull request #10653:
URL: https://github.com/apache/druid/pull/10653#discussion_r538612888



##########
File path: sql/src/test/java/org/apache/druid/sql/calcite/CalciteQueryTest.java
##########
@@ -12159,23 +12159,23 @@ public void 
testGroupingAggregatorWithPostAggregator() throws Exception
     List<Object[]> resultList;
     if (NullHandling.sqlCompatible()) {
       resultList = ImmutableList.of(
-          new Object[]{NULL_STRING, 2L, 0L, "INDIVIDUAL"},
-          new Object[]{"", 1L, 0L, "INDIVIDUAL"},
-          new Object[]{"a", 2L, 0L, "INDIVIDUAL"},
-          new Object[]{"abc", 1L, 0L, "INDIVIDUAL"},
+          new Object[]{NULL_STRING, 2L, 0L, NULL_STRING},
+          new Object[]{"", 1L, 0L, ""},
+          new Object[]{"a", 2L, 0L, "a"},
+          new Object[]{"abc", 1L, 0L, "abc"},
           new Object[]{NULL_STRING, 6L, 1L, "ALL"}
       );
     } else {
       resultList = ImmutableList.of(
-          new Object[]{"", 3L, 0L, "INDIVIDUAL"},
-          new Object[]{"a", 2L, 0L, "INDIVIDUAL"},
-          new Object[]{"abc", 1L, 0L, "INDIVIDUAL"},
+          new Object[]{"", 3L, 0L, ""},
+          new Object[]{"a", 2L, 0L, "a"},
+          new Object[]{"abc", 1L, 0L, "abc"},
           new Object[]{NULL_STRING, 6L, 1L, "ALL"}
       );
     }
     testQuery(
         "SELECT dim2, SUM(cnt), GROUPING(dim2), \n"
-        + "CASE WHEN GROUPING(dim2) = 1 THEN 'ALL' ELSE 'INDIVIDUAL' END\n"
+        + "CASE WHEN GROUPING(dim2) = 1 THEN 'ALL' ELSE dim2 END\n"

Review comment:
       I wrote this test when I submitted the patch for the grouping function. 
I had wanted to write it this way (as is in PR) but couldn't because of the 
post-aggregation bug. Now changing it as I am fixing the bug. BTW There are two 
more tests for the grouping function. 




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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to