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

Method GetBestExecutor

cpp/src/arrow/compute/function.cc:316–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316Result<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
335namespace {
336

Callers

nothing calls this directly

Calls 3

MakeScalarFunction · 0.85
kindFunction · 0.70
NotImplementedFunction · 0.50

Tested by

no test coverage detected