| 330 | } |
| 331 | |
| 332 | Result<std::shared_ptr<Buffer>> SerializeType( |
| 333 | const DataType& type, ExtensionSet* ext_set, |
| 334 | const ConversionOptions& conversion_options) { |
| 335 | ARROW_ASSIGN_OR_RAISE(auto st_type, |
| 336 | ToProto(type, /*nullable=*/true, ext_set, conversion_options)); |
| 337 | std::string serialized = st_type->SerializeAsString(); |
| 338 | return Buffer::FromString(std::move(serialized)); |
| 339 | } |
| 340 | |
| 341 | Result<compute::Expression> DeserializeExpression( |
| 342 | const Buffer& buf, const ExtensionSet& ext_set, |