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

Function MakeArithmeticFunction

cpp/src/arrow/compute/kernels/scalar_arithmetic.cc:896–905  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

894
895template <typename Op, typename FunctionImpl = ArithmeticFunction>
896std::shared_ptr<ScalarFunction> MakeArithmeticFunction(std::string name,
897 FunctionDoc doc) {
898 auto func = std::make_shared<FunctionImpl>(name, Arity::Binary(), std::move(doc));
899 for (const auto& ty : NumericTypes()) {
900 auto exec = ArithmeticExecFromOp<ScalarBinaryEqualTypes, Op>(ty);
901 DCHECK_OK(func->AddKernel({ty, ty}, ty, exec));
902 }
903 AddNullExec(func.get());
904 return func;
905}
906
907// Like MakeArithmeticFunction, but for arithmetic ops that need to run
908// only on non-null output.

Callers

nothing calls this directly

Calls 4

AddNullExecFunction · 0.85
BinaryFunction · 0.50
AddKernelMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected