| 106 | } |
| 107 | |
| 108 | Status DecodeOption(const substrait::FunctionOption& opt, SubstraitCall* call) { |
| 109 | std::vector<std::string_view> prefs; |
| 110 | if (opt.preference_size() == 0) { |
| 111 | return Status::Invalid("Invalid Substrait plan. The option ", opt.name(), |
| 112 | " is specified but does not list any choices"); |
| 113 | } |
| 114 | for (const auto& preference : opt.preference()) { |
| 115 | prefs.push_back(preference); |
| 116 | } |
| 117 | call->SetOption(opt.name(), prefs); |
| 118 | return Status::OK(); |
| 119 | } |
| 120 | |
| 121 | Result<SubstraitCall> DecodeScalarFunction( |
| 122 | Id id, const substrait::Expression::ScalarFunction& scalar_fn, |