MCPcopy Create free account
hub / github.com/apache/arrow / DecodeArg

Function DecodeArg

cpp/src/arrow/engine/substrait/expression_internal.cc:91–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91Status DecodeArg(const substrait::FunctionArgument& arg, int idx, SubstraitCall* call,
92 const ExtensionSet& ext_set,
93 const ConversionOptions& conversion_options) {
94 if (!arg.enum_().empty()) {
95 call->SetEnumArg(idx, arg.enum_());
96 } else if (arg.has_value()) {
97 ARROW_ASSIGN_OR_RAISE(compute::Expression expr,
98 FromProto(arg.value(), ext_set, conversion_options));
99 call->SetValueArg(idx, std::move(expr));
100 } else if (arg.has_type()) {
101 return Status::NotImplemented("Type arguments not currently supported");
102 } else {
103 return Status::NotImplemented("Unrecognized function argument class");
104 }
105 return Status::OK();
106}
107
108Status DecodeOption(const substrait::FunctionOption& opt, SubstraitCall* call) {
109 std::vector<std::string_view> prefs;

Callers 2

DecodeScalarFunctionFunction · 0.85
FromProtoFunction · 0.85

Calls 5

SetEnumArgMethod · 0.80
SetValueArgMethod · 0.80
NotImplementedFunction · 0.70
OKFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected