bkietz commented on code in PR #14415: URL: https://github.com/apache/arrow/pull/14415#discussion_r1022848852
########## cpp/src/arrow/engine/substrait/expression_internal.cc: ########## @@ -80,15 +69,31 @@ Status DecodeArg(const substrait::FunctionArgument& arg, uint32_t idx, return Status::OK(); } +Status DecodeOption(const substrait::FunctionOption& opt, SubstraitCall* call) { + std::vector<std::string_view> prefs; + if (opt.preference_size() == 0) { + return Status::Invalid("Invalid Substrait plan. The option ", opt.name(), + " is specified but does not list any choices"); + } + for (const auto& preference : opt.preference()) { + prefs.push_back(preference); + } + call->SetOption(opt.name(), prefs); Review Comment: ```suggestion call->SetOption(opt.name(), std::move(prefs)); ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org