1 | #include "duckdb/planner/expression_binder/index_binder.hpp" |
---|---|
2 | |
3 | using namespace duckdb; |
4 | using namespace std; |
5 | |
6 | IndexBinder::IndexBinder(Binder &binder, ClientContext &context) : ExpressionBinder(binder, context) { |
7 | } |
8 | |
9 | BindResult IndexBinder::BindExpression(ParsedExpression &expr, idx_t depth, bool root_expression) { |
10 | switch (expr.expression_class) { |
11 | case ExpressionClass::WINDOW: |
12 | return BindResult("window functions are not allowed in index expressions"); |
13 | case ExpressionClass::SUBQUERY: |
14 | return BindResult("cannot use subquery in index expressions"); |
15 | default: |
16 | return ExpressionBinder::BindExpression(expr, depth); |
17 | } |
18 | } |
19 | |
20 | string IndexBinder::UnsupportedAggregateMessage() { |
21 | return "aggregate functions are not allowed in index expressions"; |
22 | } |
23 |