| 46 | } |
| 47 | |
| 48 | std::string OpaqueType::Serialize() const { |
| 49 | JsonWriter writer; |
| 50 | |
| 51 | writer.StartObject(); |
| 52 | |
| 53 | writer.StringField("type_name", type_name_); |
| 54 | writer.StringField("vendor_name", vendor_name_); |
| 55 | |
| 56 | writer.EndObject(); |
| 57 | |
| 58 | Result<std::string_view> json = writer.GetString(); |
| 59 | // can only fail in OutOfMemory scenarios |
| 60 | ARROW_CHECK_OK(json.status()); |
| 61 | return std::string(*json); |
| 62 | } |
| 63 | |
| 64 | Result<std::shared_ptr<DataType>> OpaqueType::Deserialize( |
| 65 | std::shared_ptr<DataType> storage_type, const std::string& serialized_data) const { |
nothing calls this directly
no test coverage detected