1//===----------------------------------------------------------------------===//
2// DuckDB
3//
4// duckdb/planner/expression_binder/qualify_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
14namespace duckdb {
15
16//! The QUALIFY binder is responsible for binding an expression within the QUALIFY clause of a SQL statement
17class QualifyBinder : public BaseSelectBinder {
18public:
19 QualifyBinder(Binder &binder, ClientContext &context, BoundSelectNode &node, BoundGroupInformation &info,
20 case_insensitive_map_t<idx_t> &alias_map);
21
22protected:
23 BindResult BindExpression(unique_ptr<ParsedExpression> &expr_ptr, idx_t depth,
24 bool root_expression = false) override;
25
26private:
27 BindResult BindColumnRef(unique_ptr<ParsedExpression> &expr_ptr, idx_t depth, bool root_expression);
28
29 ColumnAliasBinder column_alias_binder;
30};
31
32} // namespace duckdb
33