morrySnow commented on code in PR #32490:
URL: https://github.com/apache/doris/pull/32490#discussion_r1531699044
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindExpression.java:
##########
@@ -764,6 +810,25 @@ private void
checkIfOutputAliasNameDuplicatedForGroupBy(Collection<Expression> e
}
}
+ private boolean hasAggregateFunction(Expression expression,
FunctionRegistry functionRegistry) {
+ return expression.anyMatch(expr -> {
+ if (expr instanceof AggregateFunction) {
Review Comment:
only slots in agg's children bind child's output first, for example:
```sql
select abs(sum(c1)) as c1 from t having sum(c2) + c1 > 0
```
in having, `c2` under `sum` bind with agg's child, but `c1` bind with agg's
output first
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]