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

Function ExecPlan_run

r/src/compute-exec.cpp:225–245  ·  view source on GitHub ↗

[[acero::export]]

Source from the content-addressed store, hash-verified

223
224// [[acero::export]]
225std::shared_ptr<ExecPlanReader> ExecPlan_run(
226 const std::shared_ptr<acero::ExecPlan>& plan,
227 const std::shared_ptr<acero::ExecNode>& final_node, cpp11::strings metadata) {
228 // For now, don't require R to construct SinkNodes.
229 // Instead, just pass the node we should collect as an argument.
230 arrow::AsyncGenerator<std::optional<compute::ExecBatch>> sink_gen;
231
232 MakeExecNodeOrStop("sink", plan.get(), {final_node.get()},
233 acero::SinkNodeOptions{&sink_gen});
234
235 StopIfNotOk(plan->Validate());
236
237 // Attach metadata to the schema
238 auto out_schema = final_node->output_schema();
239 if (metadata.size() > 0) {
240 auto kv = strings_to_kvm(metadata);
241 out_schema = out_schema->WithMetadata(kv);
242 }
243
244 return std::make_shared<ExecPlanReader>(plan, out_schema, sink_gen);
245}
246
247// [[acero::export]]
248std::string ExecPlan_ToString(const std::shared_ptr<acero::ExecPlan>& plan) {

Callers 1

_arrow_ExecPlan_runFunction · 0.85

Calls 7

MakeExecNodeOrStopFunction · 0.85
StopIfNotOkFunction · 0.85
strings_to_kvmFunction · 0.85
getMethod · 0.45
ValidateMethod · 0.45
sizeMethod · 0.45
WithMetadataMethod · 0.45

Tested by

no test coverage detected