You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2022/05/19 23:25:33 UTC

[GitHub] [calcite] julianhyde commented on a diff in pull request #2771: [CALCITE-5089] Allow GROUP BY ALL or DISTINCT set quantifier on GROUPING SETS

julianhyde commented on code in PR #2771:
URL: https://github.com/apache/calcite/pull/2771#discussion_r877611494


##########
core/src/main/codegen/templates/Parser.jj:
##########
@@ -2509,8 +2510,7 @@ SqlNodeList GroupByOpt() :
     list = GroupingElementList() {
         if (distinct) {
             SqlNode groupByDistinct = SqlInternalOperators.GROUP_BY_DISTINCT.createCall(s.add(getPos()).pos(), list);
-            list = new ArrayList<SqlNode>();
-            list.add(groupByDistinct);
+            list = ImmutableNullableList.of(groupByDistinct);

Review Comment:
   I think you can use ImmutableList, since groupByDistinct is never null



-- 
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: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org