chunweilei commented on code in PR #2771:
URL: https://github.com/apache/calcite/pull/2771#discussion_r873274497
##########
testkit/src/main/java/org/apache/calcite/sql/parser/SqlParserTest.java:
##########
@@ -2122,6 +2122,29 @@ void checkPeriodPredicate(Checker checker) {
sql(sql).ok(expected);
}
+ @Test void testGroupByAllOrDistinct() {
+ final String sql = "select deptno from emp\n"
+ + "group by all cube (a, b), rollup (a, b)";
+ final String expected = "SELECT `DEPTNO`\n"
+ + "FROM `EMP`\n"
+ + "GROUP BY CUBE(`A`, `B`), ROLLUP(`A`, `B`)";
+ sql(sql).ok(expected);
+
+ final String sql1 = "select deptno from emp\n"
+ + "group by distinct cube (a, b), rollup (a, b)";
+ final String expected1 = "SELECT `DEPTNO`\n"
Review Comment:
What's the behavior of PostgreSQL when meeting `GROUP BY DISTINCT ()`?
--
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]