1//===----------------------------------------------------------------------===//
2// DuckDB
3//
4// duckdb/optimizer/in_clause_rewriter.hpp
5//
6//
7//===----------------------------------------------------------------------===//
8
9#pragma once
10
11#include "duckdb/planner/logical_operator_visitor.hpp"
12
13namespace duckdb {
14class ClientContext;
15class Optimizer;
16
17class InClauseRewriter : public LogicalOperatorVisitor {
18public:
19 explicit InClauseRewriter(ClientContext &context, Optimizer &optimizer) : context(context), optimizer(optimizer) {
20 }
21
22 ClientContext &context;
23 Optimizer &optimizer;
24 unique_ptr<LogicalOperator> root;
25
26public:
27 unique_ptr<LogicalOperator> Rewrite(unique_ptr<LogicalOperator> op);
28
29 unique_ptr<Expression> VisitReplace(BoundOperatorExpression &expr, unique_ptr<Expression> *expr_ptr) override;
30};
31
32} // namespace duckdb
33