| 314 | } |
| 315 | |
| 316 | Result<std::shared_ptr<Buffer>> SerializeSchema( |
| 317 | const Schema& schema, ExtensionSet* ext_set, |
| 318 | const ConversionOptions& conversion_options) { |
| 319 | ARROW_ASSIGN_OR_RAISE(auto named_struct, ToProto(schema, ext_set, conversion_options)); |
| 320 | std::string serialized = named_struct->SerializeAsString(); |
| 321 | return Buffer::FromString(std::move(serialized)); |
| 322 | } |
| 323 | |
| 324 | Result<std::shared_ptr<DataType>> DeserializeType( |
| 325 | const Buffer& buf, const ExtensionSet& ext_set, |