mihaibudiu commented on code in PR #5130:
URL: https://github.com/apache/calcite/pull/5130#discussion_r3707600254


##########
core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java:
##########
@@ -2261,8 +2261,42 @@ && hasSortByOrdinal(node)) {
         if (groupKeysContainOver(agg)) {
           return true;
         }
+
+        if (!dialect.supportsGroupByLiteral()
+            && hasGroupByLiteral(agg)) {
+          return true;
+        }
+      }
+
+      return false;
+    }
+
+    /**
+     * Returns whether any grouping key of {@code aggregate} is represented by
+     * a literal expression in this result's {@code SELECT} list.
+     *
+     * <p>A literal wrapped in a {@code CAST} is also considered a literal.

Review Comment:
   I don't see anything about casts here. What is this comment about?



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