1//===----------------------------------------------------------------------===//
2// DuckDB
3//
4// duckdb/planner/operator/logical_unnest.hpp
5//
6//
7//===----------------------------------------------------------------------===//
8
9#pragma once
10
11#include "duckdb/planner/logical_operator.hpp"
12
13namespace duckdb {
14
15//! LogicalUnnest represents the logical UNNEST operator.
16class LogicalUnnest : public LogicalOperator {
17public:
18 static constexpr const LogicalOperatorType TYPE = LogicalOperatorType::LOGICAL_UNNEST;
19
20public:
21 explicit LogicalUnnest(idx_t unnest_index)
22 : LogicalOperator(LogicalOperatorType::LOGICAL_UNNEST), unnest_index(unnest_index) {
23 }
24
25 idx_t unnest_index;
26
27public:
28 vector<ColumnBinding> GetColumnBindings() override;
29 void Serialize(FieldWriter &writer) const override;
30 static unique_ptr<LogicalOperator> Deserialize(LogicalDeserializationState &state, FieldReader &reader);
31 vector<idx_t> GetTableIndex() const override;
32 string GetName() const override;
33
34protected:
35 void ResolveTypes() override;
36};
37} // namespace duckdb
38