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

Function DeclarationToStatusImpl

cpp/src/arrow/acero/exec_plan.cc:710–726  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

708}
709
710Future<> DeclarationToStatusImpl(Declaration declaration, QueryOptions options,
711 ::arrow::internal::Executor* cpu_executor) {
712 ExecContext exec_ctx(options.memory_pool, cpu_executor, options.function_registry);
713 ARROW_ASSIGN_OR_RAISE(std::shared_ptr<ExecPlan> exec_plan,
714 ExecPlan::Make(options, exec_ctx));
715 ARROW_ASSIGN_OR_RAISE(ExecNode * last_node, declaration.AddToPlan(exec_plan.get()));
716 if (!last_node->is_sink()) {
717 ConsumingSinkNodeOptions sink_options(NullSinkNodeConsumer::Make());
718 sink_options.sequence_output = options.sequence_output;
719 Declaration null_sink = Declaration("consuming_sink", {last_node}, sink_options);
720 ARROW_RETURN_NOT_OK(null_sink.AddToPlan(exec_plan.get()));
721 }
722 ARROW_RETURN_NOT_OK(exec_plan->Validate());
723 exec_plan->StartProducing();
724 // Keep the exec_plan alive until it finishes
725 return exec_plan->finished().Then([exec_plan]() {});
726}
727
728QueryOptions QueryOptionsFromCustomExecContext(ExecContext exec_context) {
729 QueryOptions options;

Callers 2

DeclarationToStatusAsyncFunction · 0.85
DeclarationToStatusFunction · 0.85

Calls 9

AddToPlanMethod · 0.80
ThenMethod · 0.80
finishedMethod · 0.80
ARROW_ASSIGN_OR_RAISEFunction · 0.70
DeclarationClass · 0.70
MakeFunction · 0.50
getMethod · 0.45
ValidateMethod · 0.45
StartProducingMethod · 0.45

Tested by

no test coverage detected