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

Function MakeFunction

cpp/src/arrow/compute/kernels/scalar_boolean.cc:401–412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

399};
400
401void MakeFunction(const std::string& name, int arity, ArrayKernelExec exec,
402 FunctionDoc doc, FunctionRegistry* registry,
403 NullHandling::type null_handling = NullHandling::INTERSECTION) {
404 auto func = std::make_shared<ScalarFunction>(name, Arity(arity), std::move(doc));
405
406 std::vector<InputType> in_types(arity, InputType(boolean()));
407 ScalarKernel kernel(std::move(in_types), boolean(), exec);
408 kernel.null_handling = null_handling;
409
410 DCHECK_OK(func->AddKernel(kernel));
411 DCHECK_OK(registry->AddFunction(std::move(func)));
412}
413
414const FunctionDoc invert_doc{"Invert boolean values", "", {"values"}};
415

Callers 15

RegisterScalarBooleanFunction · 0.70
MakeExpressionMethod · 0.50
MakeConditionMethod · 0.50
TEST_FFunction · 0.50
TEST_FFunction · 0.50
TEST_FFunction · 0.50
TEST_FFunction · 0.50
TEST_FFunction · 0.50
TEST_FFunction · 0.50
TEST_FFunction · 0.50
TEST_FFunction · 0.50

Calls 4

ArityFunction · 0.85
InputTypeFunction · 0.85
AddKernelMethod · 0.45
AddFunctionMethod · 0.45

Tested by 15

TEST_FFunction · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40
TimedTestAdd3Function · 0.40
TimedTestBigNestedFunction · 0.40