xiedeyantu commented on code in PR #4548:
URL: https://github.com/apache/calcite/pull/4548#discussion_r2366250051
##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java:
##########
@@ -487,6 +487,14 @@ private boolean expandSelectItem(final SqlNode selectItem,
SqlSelect select,
// calls.
selectScope = getSelectScope(select);
expanded = expandSelectExpr(selectItem, scope, select, expansions);
+
+ // Non-strict GROUP BY: wrap non-aggregated, non-grouped columns in
ANY_VALUE()
+ if (isAggregate(select)
+ && config.conformance().isNonStrictGroupBy()
+ && isNonAggregatedNonGroupedColumn(expanded, select)) {
Review Comment:
I have enriched the test cases in agg.iq. Please take a look to see if there
are any scenarios that are not yet covered.
--
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]