1 | #include "duckdb/planner/operator/logical_extension_operator.hpp" |
---|---|
2 | #include "duckdb/main/config.hpp" |
3 | |
4 | namespace duckdb { |
5 | unique_ptr<LogicalExtensionOperator> LogicalExtensionOperator::Deserialize(LogicalDeserializationState &state, |
6 | FieldReader &reader) { |
7 | auto &config = DBConfig::GetConfig(context&: state.gstate.context); |
8 | |
9 | auto extension_name = reader.ReadRequired<std::string>(); |
10 | for (auto &extension : config.operator_extensions) { |
11 | if (extension->GetName() == extension_name) { |
12 | return extension->Deserialize(state, reader); |
13 | } |
14 | } |
15 | |
16 | throw SerializationException("No serialization method exists for extension: "+ extension_name); |
17 | } |
18 | } // namespace duckdb |
19 |