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

Method AddStatefulFunction

cpp/src/arrow/compute/exec_test.cc:1077–1088  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1075 }
1076
1077 void AddStatefulFunction() {
1078 auto registry = GetFunctionRegistry();
1079
1080 // This function's behavior depends on a static parameter that is made
1081 // available to the kernel's execution function through its Options object
1082 auto func = std::make_shared<ScalarFunction>("test_stateful", Arity::Unary(),
1083 /*doc=*/FunctionDoc::Empty());
1084
1085 ScalarKernel kernel({int32()}, int32(), ExecStateful, InitStateful);
1086 ASSERT_OK(func->AddKernel(kernel));
1087 ASSERT_OK(registry->AddFunction(func));
1088 }
1089
1090 void AddScalarFunction() {
1091 auto registry = GetFunctionRegistry();

Callers

nothing calls this directly

Calls 5

GetFunctionRegistryFunction · 0.85
UnaryFunction · 0.85
EmptyClass · 0.50
AddKernelMethod · 0.45
AddFunctionMethod · 0.45

Tested by

no test coverage detected