1//===----------------------------------------------------------------------===//
2// DuckDB
3//
4// duckdb/planner/operator/logical_empty_result.hpp
5//
6//
7//===----------------------------------------------------------------------===//
8
9#pragma once
10
11#include "duckdb/planner/logical_operator.hpp"
12
13namespace duckdb {
14
15//! LogicalEmptyResult returns an empty result. This is created by the optimizer if it can reason that ceratin parts of
16//! the tree will always return an empty result.
17class LogicalEmptyResult : public LogicalOperator {
18public:
19 LogicalEmptyResult(unique_ptr<LogicalOperator> op);
20
21 //! The set of return types of the empty result
22 vector<TypeId> return_types;
23 //! The columns that would be bound at this location (if the subtree was not optimized away)
24 vector<ColumnBinding> bindings;
25
26public:
27 vector<ColumnBinding> GetColumnBindings() override {
28 return bindings;
29 }
30
31protected:
32 void ResolveTypes() override {
33 this->types = return_types;
34 }
35};
36} // namespace duckdb
37