| 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(); |
nothing calls this directly
no test coverage detected