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


##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java:
##########
@@ -554,7 +555,11 @@ private boolean isNonAggregatedNonGroupedColumn(SqlNode 
node, SqlSelect select)
     }
 
     if (node instanceof SqlCall) {
-      return ((SqlCall) node).getOperandList().stream()
+      final SqlCall call = (SqlCall) node;

Review Comment:
   is this change related to this PR?



##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java:
##########
@@ -489,9 +489,10 @@ private boolean expandSelectItem(final SqlNode selectItem, 
SqlSelect select,
       selectScope = getSelectScope(select);
       expanded = expandSelectExpr(selectItem, scope, select, expansions);
 
-      // Non-strict GROUP BY: wrap non-aggregated, non-grouped columns in 
ANY_VALUE()
+      // Non-strict GROUP BY or BY clause: wrap non-aggregated, non-grouped 
columns in ANY_VALUE()
       if (isAggregate(select)
-          && config.conformance().isNonStrictGroupBy()
+          && (config.conformance().isNonStrictGroupBy()
+          || select.hasByClause())

Review Comment:
   is this still needed?



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