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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to