xuzifu666 commented on code in PR #5052:
URL: https://github.com/apache/calcite/pull/5052#discussion_r3487025840
##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java:
##########
@@ -5599,6 +5601,11 @@ protected RelDataType validateSelectList(final
SqlNodeList selectItems,
// First pass, ensure that aliases are unique. "*" and "TABLE.*" items
// are ignored.
+ // Rewrite scalar sub-queries whose single select item is an aggregate
+ // over outer columns. The aggregate belongs to the outer query per SQL
+ // standard.
+ rewriteOuterAggregatesInSelectList(select);
Review Comment:
Yes, the latest commit implements controls in this area.
--
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]