1#include "duckdb/planner/operator/logical_positional_join.hpp"
2
3namespace duckdb {
4
5LogicalPositionalJoin::LogicalPositionalJoin(unique_ptr<LogicalOperator> left, unique_ptr<LogicalOperator> right)
6 : LogicalUnconditionalJoin(LogicalOperatorType::LOGICAL_POSITIONAL_JOIN, std::move(left), std::move(right)) {
7}
8
9unique_ptr<LogicalOperator> LogicalPositionalJoin::Create(unique_ptr<LogicalOperator> left,
10 unique_ptr<LogicalOperator> right) {
11 if (left->type == LogicalOperatorType::LOGICAL_DUMMY_SCAN) {
12 return right;
13 }
14 if (right->type == LogicalOperatorType::LOGICAL_DUMMY_SCAN) {
15 return left;
16 }
17 return make_uniq<LogicalPositionalJoin>(args: std::move(left), args: std::move(right));
18}
19
20void LogicalPositionalJoin::Serialize(FieldWriter &writer) const {
21}
22
23unique_ptr<LogicalOperator> LogicalPositionalJoin::Deserialize(LogicalDeserializationState &state,
24 FieldReader &reader) {
25 // TODO(stephwang): review if unique_ptr<LogicalOperator> plan is needed
26 auto result = unique_ptr<LogicalPositionalJoin>(new LogicalPositionalJoin());
27 return std::move(result);
28}
29
30} // namespace duckdb
31