1//===----------------------------------------------------------------------===//
2// DuckDB
3//
4// duckdb/planner/operator/logical_simple.hpp
5//
6//
7//===----------------------------------------------------------------------===//
8
9#pragma once
10
11#include "duckdb/common/enums/statement_type.hpp"
12#include "duckdb/parser/parsed_data/parse_info.hpp"
13#include "duckdb/planner/logical_operator.hpp"
14
15namespace duckdb {
16
17//! LogicalSimple represents a simple logical operator that only passes on the parse info
18class LogicalSimple : public LogicalOperator {
19public:
20 static constexpr const LogicalOperatorType TYPE = LogicalOperatorType::LOGICAL_INVALID;
21
22public:
23 LogicalSimple(LogicalOperatorType type, unique_ptr<ParseInfo> info) : LogicalOperator(type), info(std::move(info)) {
24 }
25
26 unique_ptr<ParseInfo> info;
27
28public:
29 void Serialize(FieldWriter &writer) const override;
30 static unique_ptr<LogicalOperator> Deserialize(LogicalDeserializationState &state, FieldReader &reader);
31 idx_t EstimateCardinality(ClientContext &context) override;
32
33protected:
34 void ResolveTypes() override {
35 types.emplace_back(args: LogicalType::BOOLEAN);
36 }
37};
38} // namespace duckdb
39