| 57 | } |
| 58 | |
| 59 | Result<std::unique_ptr<FunctionOptions>> FunctionOptionsFromStructScalar( |
| 60 | const StructScalar& scalar) { |
| 61 | ARROW_ASSIGN_OR_RAISE(auto type_name_holder, scalar.field(kTypeNameField)); |
| 62 | const std::string type_name = |
| 63 | checked_cast<const BinaryScalar&>(*type_name_holder).value->ToString(); |
| 64 | ARROW_ASSIGN_OR_RAISE(auto raw_options_type, |
| 65 | GetFunctionRegistry()->GetFunctionOptionsType(type_name)); |
| 66 | const auto* options_type = checked_cast<const GenericOptionsType*>(raw_options_type); |
| 67 | return options_type->FromStructScalar(scalar); |
| 68 | } |
| 69 | |
| 70 | Result<std::shared_ptr<Buffer>> GenericOptionsType::Serialize( |
| 71 | const FunctionOptions& options) const { |
no test coverage detected