1fanwang commented on code in PR #5225:
URL: https://github.com/apache/calcite/pull/5225#discussion_r4412139160
##########
core/src/main/java/org/apache/calcite/sql/validate/OrderByScope.java:
##########
@@ -93,6 +96,27 @@ public class OrderByScope extends DelegatingScope {
@Override public void validateExpr(SqlNode expr) {
SqlNode expanded = validator.expandOrderExpr(select, expr);
+ expanded.accept(
+ new AggVisitor(validator.getOperatorTable(), false, true,
+ false, null, validator.catalogReader.nameMatcher()) {
+ @Override public Void visit(SqlCall call) {
+ switch (call.getKind()) {
+ case FILTER:
+ case WITHIN_GROUP:
Review Comment:
Done in
https://github.com/apache/calcite/commit/c432381d7f1ec520ff8c9db7dfa127ecd2682144.
The new test fails without the WITHIN_DISTINCT case.
--
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]