1#include "duckdb/planner/operator/logical_order.hpp"
2
3#include "duckdb/common/field_writer.hpp"
4
5namespace duckdb {
6
7void LogicalOrder::Serialize(FieldWriter &writer) const {
8 writer.WriteRegularSerializableList(elements: orders);
9 writer.WriteList<idx_t>(elements: projections);
10}
11
12unique_ptr<LogicalOperator> LogicalOrder::Deserialize(LogicalDeserializationState &state, FieldReader &reader) {
13 auto orders = reader.ReadRequiredSerializableList<BoundOrderByNode, BoundOrderByNode>(args&: state.gstate);
14 auto projections = reader.ReadRequiredList<idx_t>();
15 auto result = make_uniq<LogicalOrder>(args: std::move(orders));
16 result->projections = std::move(projections);
17 return std::move(result);
18}
19
20} // namespace duckdb
21