| 1 | #include "duckdb/planner/operator/logical_create.hpp" |
|---|---|
| 2 | |
| 3 | namespace duckdb { |
| 4 | |
| 5 | void LogicalCreate::Serialize(FieldWriter &writer) const { |
| 6 | info->Serialize(serializer&: writer.GetSerializer()); |
| 7 | } |
| 8 | |
| 9 | unique_ptr<LogicalOperator> LogicalCreate::Deserialize(LogicalDeserializationState &state, FieldReader &reader) { |
| 10 | auto &context = state.gstate.context; |
| 11 | auto info = CreateInfo::Deserialize(deserializer&: reader.GetSource()); |
| 12 | |
| 13 | auto schema_catalog_entry = Catalog::GetSchema(context, catalog_name: info->catalog, schema_name: info->schema, if_not_found: OnEntryNotFound::RETURN_NULL); |
| 14 | return make_uniq<LogicalCreate>(args&: state.type, args: std::move(info), args&: schema_catalog_entry); |
| 15 | } |
| 16 | |
| 17 | idx_t LogicalCreate::EstimateCardinality(ClientContext &context) { |
| 18 | return 1; |
| 19 | } |
| 20 | |
| 21 | } // namespace duckdb |
| 22 |