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

Function DecodeScalarFunction

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

Source from the content-addressed store, hash-verified

119}
120
121Result<SubstraitCall> DecodeScalarFunction(
122 Id id, const substrait::Expression::ScalarFunction& scalar_fn,
123 const ExtensionSet& ext_set, const ConversionOptions& conversion_options) {
124 ARROW_ASSIGN_OR_RAISE(auto output_type_and_nullable,
125 FromProto(scalar_fn.output_type(), ext_set, conversion_options));
126 SubstraitCall call(id, output_type_and_nullable.first, output_type_and_nullable.second);
127 for (int i = 0; i < scalar_fn.arguments_size(); i++) {
128 ARROW_RETURN_NOT_OK(
129 DecodeArg(scalar_fn.arguments(i), i, &call, ext_set, conversion_options));
130 }
131 for (const auto& opt : scalar_fn.options()) {
132 ARROW_RETURN_NOT_OK(DecodeOption(opt, &call));
133 }
134 return call;
135}
136
137Result<compute::Expression> FromProto(const substrait::Expression::ReferenceSegment* ref,
138 const ExtensionSet& ext_set,

Callers

nothing calls this directly

Calls 4

DecodeArgFunction · 0.85
DecodeOptionFunction · 0.85
argumentsMethod · 0.80
optionsMethod · 0.45

Tested by

no test coverage detected