1#include "duckdb/common/field_writer.hpp"
2#include "duckdb/planner/operator/logical_show.hpp"
3
4namespace duckdb {
5
6void LogicalShow::Serialize(FieldWriter &writer) const {
7 writer.WriteRegularSerializableList(elements: types_select);
8 writer.WriteList<string>(elements: aliases);
9}
10
11unique_ptr<LogicalOperator> LogicalShow::Deserialize(LogicalDeserializationState &state, FieldReader &reader) {
12 auto types_select = reader.ReadRequiredSerializableList<LogicalType, LogicalType>();
13 auto aliases = reader.ReadRequiredList<string>();
14
15 // TODO(stephwang): review if we need to pass unique_ptr<LogicalOperator> plan
16 auto result = unique_ptr<LogicalShow>(new LogicalShow());
17 result->types_select = types_select;
18 result->aliases = aliases;
19 return std::move(result);
20}
21} // namespace duckdb
22