| 410 | } |
| 411 | |
| 412 | Status ScalarFunction::AddKernel(std::vector<InputType> in_types, OutputType out_type, |
| 413 | ArrayKernelExec exec, KernelInit init, |
| 414 | std::shared_ptr<MatchConstraint> constraint) { |
| 415 | RETURN_NOT_OK(CheckArity(in_types.size())); |
| 416 | |
| 417 | if (arity_.is_varargs && in_types.size() != 1) { |
| 418 | return Status::Invalid("VarArgs signatures must have exactly one input type"); |
| 419 | } |
| 420 | auto sig = KernelSignature::Make(std::move(in_types), std::move(out_type), |
| 421 | arity_.is_varargs, std::move(constraint)); |
| 422 | kernels_.emplace_back(std::move(sig), exec, init); |
| 423 | return Status::OK(); |
| 424 | } |
| 425 | |
| 426 | Status ScalarFunction::AddKernel(ScalarKernel kernel) { |
| 427 | RETURN_NOT_OK(CheckArity(kernel.signature->in_types().size())); |
nothing calls this directly
no test coverage detected