1 | //===----------------------------------------------------------------------===// |
---|---|
2 | // DuckDB |
3 | // |
4 | // duckdb/planner/expression_binder/select_binder.hpp |
5 | // |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #pragma once |
10 | |
11 | #include "duckdb/planner/expression_binder/base_select_binder.hpp" |
12 | |
13 | namespace duckdb { |
14 | |
15 | //! The SELECT binder is responsible for binding an expression within the SELECT clause of a SQL statement |
16 | class SelectBinder : public BaseSelectBinder { |
17 | public: |
18 | SelectBinder(Binder &binder, ClientContext &context, BoundSelectNode &node, BoundGroupInformation &info, |
19 | case_insensitive_map_t<idx_t> alias_map); |
20 | SelectBinder(Binder &binder, ClientContext &context, BoundSelectNode &node, BoundGroupInformation &info); |
21 | |
22 | bool HasExpandedExpressions() { |
23 | return !expanded_expressions.empty(); |
24 | } |
25 | vector<unique_ptr<Expression>> &ExpandedExpressions() { |
26 | return expanded_expressions; |
27 | } |
28 | |
29 | protected: |
30 | BindResult BindUnnest(FunctionExpression &function, idx_t depth, bool root_expression) override; |
31 | |
32 | idx_t unnest_level = 0; |
33 | vector<unique_ptr<Expression>> expanded_expressions; |
34 | }; |
35 | |
36 | } // namespace duckdb |
37 |