| 314 | } |
| 315 | |
| 316 | Result<std::shared_ptr<FunctionExecutor>> Function::GetBestExecutor( |
| 317 | std::vector<TypeHolder> inputs) const { |
| 318 | std::unique_ptr<detail::KernelExecutor> executor; |
| 319 | if (kind() == Function::SCALAR) { |
| 320 | executor = detail::KernelExecutor::MakeScalar(); |
| 321 | } else if (kind() == Function::VECTOR) { |
| 322 | executor = detail::KernelExecutor::MakeVector(); |
| 323 | } else if (kind() == Function::SCALAR_AGGREGATE) { |
| 324 | executor = detail::KernelExecutor::MakeScalarAggregate(); |
| 325 | } else { |
| 326 | return Status::NotImplemented("Direct execution of HASH_AGGREGATE functions"); |
| 327 | } |
| 328 | |
| 329 | ARROW_ASSIGN_OR_RAISE(const Kernel* kernel, DispatchBest(&inputs)); |
| 330 | |
| 331 | return std::make_shared<detail::FunctionExecutorImpl>(std::move(inputs), kernel, |
| 332 | std::move(executor), *this); |
| 333 | } |
| 334 | |
| 335 | namespace { |
| 336 |
nothing calls this directly
no test coverage detected