| 146 | } |
| 147 | |
| 148 | Result<std::shared_ptr<DataType>> PyExtensionType::Deserialize( |
| 149 | std::shared_ptr<DataType> storage_type, const std::string& serialized_data) const { |
| 150 | PyAcquireGIL lock; |
| 151 | |
| 152 | if (import_pyarrow()) { |
| 153 | return ConvertPyError(); |
| 154 | } |
| 155 | OwnedRef res(DeserializeExtInstance(type_class_.obj(), storage_type, serialized_data)); |
| 156 | if (!res) { |
| 157 | return ConvertPyError(); |
| 158 | } |
| 159 | return unwrap_data_type(res.obj()); |
| 160 | } |
| 161 | |
| 162 | PyObject* PyExtensionType::GetInstance() const { |
| 163 | if (!type_instance_) { |
nothing calls this directly
no test coverage detected