1 | //===----------------------------------------------------------------------===// |
---|---|
2 | // DuckDB |
3 | // |
4 | // duckdb/planner/expression_binder/having_binder.hpp |
5 | // |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #pragma once |
10 | |
11 | #include "duckdb/planner/expression_binder/base_select_binder.hpp" |
12 | #include "duckdb/planner/expression_binder/column_alias_binder.hpp" |
13 | #include "duckdb/common/enums/aggregate_handling.hpp" |
14 | |
15 | namespace duckdb { |
16 | |
17 | //! The HAVING binder is responsible for binding an expression within the HAVING clause of a SQL statement |
18 | class HavingBinder : public BaseSelectBinder { |
19 | public: |
20 | HavingBinder(Binder &binder, ClientContext &context, BoundSelectNode &node, BoundGroupInformation &info, |
21 | case_insensitive_map_t<idx_t> &alias_map, AggregateHandling aggregate_handling); |
22 | |
23 | protected: |
24 | BindResult BindExpression(unique_ptr<ParsedExpression> &expr_ptr, idx_t depth, |
25 | bool root_expression = false) override; |
26 | |
27 | private: |
28 | BindResult BindColumnRef(unique_ptr<ParsedExpression> &expr_ptr, idx_t depth, bool root_expression); |
29 | |
30 | ColumnAliasBinder column_alias_binder; |
31 | AggregateHandling aggregate_handling; |
32 | }; |
33 | |
34 | } // namespace duckdb |
35 |