MCPcopy Create free account
hub / github.com/apache/arrow / RegisterType

Method RegisterType

cpp/src/arrow/extension_type.cc:106–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104 ExtensionTypeRegistryImpl() {}
105
106 Status RegisterType(std::shared_ptr<ExtensionType> type) override {
107 std::lock_guard<std::mutex> lock(lock_);
108 std::string type_name = type->extension_name();
109 auto it = name_to_type_.find(type_name);
110 if (it != name_to_type_.end()) {
111 return Status::KeyError("A type extension with name ", type_name,
112 " already defined");
113 }
114 name_to_type_[type_name] = std::move(type);
115 return Status::OK();
116 }
117
118 Status UnregisterType(const std::string& type_name) override {
119 std::lock_guard<std::mutex> lock(lock_);

Callers 3

CreateGlobalRegistryFunction · 0.45
RegisterExtensionTypeFunction · 0.45

Calls 5

KeyErrorFunction · 0.85
OKFunction · 0.70
extension_nameMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected