1#include "duckdb/planner/expression_binder/aggregate_binder.hpp"
2
3#include "duckdb/planner/binder.hpp"
4
5using namespace duckdb;
6using namespace std;
7
8AggregateBinder::AggregateBinder(Binder &binder, ClientContext &context) : ExpressionBinder(binder, context, true) {
9}
10
11BindResult AggregateBinder::BindExpression(ParsedExpression &expr, idx_t depth, bool root_expression) {
12 switch (expr.expression_class) {
13 case ExpressionClass::WINDOW:
14 throw ParserException("aggregate function calls cannot contain window function calls");
15 default:
16 return ExpressionBinder::BindExpression(expr, depth);
17 }
18}
19
20string AggregateBinder::UnsupportedAggregateMessage() {
21 return "aggregate function calls cannot be nested";
22}
23