| 399 | }; |
| 400 | |
| 401 | void 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 | |
| 414 | const FunctionDoc invert_doc{"Invert boolean values", "", {"values"}}; |
| 415 | |