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

Method AddKernel

cpp/src/arrow/compute/function.cc:412–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

410}
411
412Status ScalarFunction::AddKernel(std::vector<InputType> in_types, OutputType out_type,
413 ArrayKernelExec exec, KernelInit init,
414 std::shared_ptr<MatchConstraint> constraint) {
415 RETURN_NOT_OK(CheckArity(in_types.size()));
416
417 if (arity_.is_varargs && in_types.size() != 1) {
418 return Status::Invalid("VarArgs signatures must have exactly one input type");
419 }
420 auto sig = KernelSignature::Make(std::move(in_types), std::move(out_type),
421 arity_.is_varargs, std::move(constraint));
422 kernels_.emplace_back(std::move(sig), exec, init);
423 return Status::OK();
424}
425
426Status ScalarFunction::AddKernel(ScalarKernel kernel) {
427 RETURN_NOT_OK(CheckArity(kernel.signature->in_types().size()));

Callers

nothing calls this directly

Calls 5

emplace_backMethod · 0.80
InvalidFunction · 0.50
MakeFunction · 0.50
OKFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected