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

Function MakeFunction

cpp/src/arrow/compute/kernels/scalar_validity.cc:206–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204};
205
206void MakeFunction(std::string name, FunctionDoc doc, std::vector<InputType> in_types,
207 OutputType out_type, ArrayKernelExec exec, FunctionRegistry* registry,
208 NullHandling::type null_handling, bool can_write_into_slices,
209 const FunctionOptions* default_options = NULLPTR,
210 KernelInit init = NULLPTR) {
211 Arity arity{static_cast<int>(in_types.size())};
212 auto func =
213 std::make_shared<ScalarFunction>(name, arity, std::move(doc), default_options);
214
215 ScalarKernel kernel(std::move(in_types), out_type, exec, init);
216 kernel.null_handling = null_handling;
217 kernel.can_write_into_slices = can_write_into_slices;
218
219 DCHECK_OK(func->AddKernel(std::move(kernel)));
220 DCHECK_OK(registry->AddFunction(std::move(func)));
221}
222
223template <typename InType, typename Op>
224void AddFloatValidityKernel(const std::shared_ptr<DataType>& ty, ScalarFunction* func) {

Callers 1

RegisterScalarValidityFunction · 0.70

Calls 3

sizeMethod · 0.45
AddKernelMethod · 0.45
AddFunctionMethod · 0.45

Tested by

no test coverage detected