| 1 | #include "duckdb/planner/operator/logical_any_join.hpp" |
|---|---|
| 2 | #include "duckdb/common/field_writer.hpp" |
| 3 | |
| 4 | namespace duckdb { |
| 5 | |
| 6 | LogicalAnyJoin::LogicalAnyJoin(JoinType type) : LogicalJoin(type, LogicalOperatorType::LOGICAL_ANY_JOIN) { |
| 7 | } |
| 8 | |
| 9 | string LogicalAnyJoin::ParamsToString() const { |
| 10 | return condition->ToString(); |
| 11 | } |
| 12 | |
| 13 | void LogicalAnyJoin::Serialize(FieldWriter &writer) const { |
| 14 | writer.WriteField(element: join_type); |
| 15 | writer.WriteOptional(element: condition); |
| 16 | } |
| 17 | |
| 18 | unique_ptr<LogicalOperator> LogicalAnyJoin::Deserialize(LogicalDeserializationState &state, FieldReader &reader) { |
| 19 | auto join_type = reader.ReadRequired<JoinType>(); |
| 20 | auto condition = reader.ReadOptional<Expression>(default_value: nullptr, args&: state.gstate); |
| 21 | auto result = make_uniq<LogicalAnyJoin>(args&: join_type); |
| 22 | result->condition = std::move(condition); |
| 23 | return std::move(result); |
| 24 | } |
| 25 | |
| 26 | } // namespace duckdb |
| 27 |