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

Function StartAndCollect

cpp/src/arrow/acero/test_util_internal.cc:154–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154Future<std::vector<ExecBatch>> StartAndCollect(
155 ExecPlan* plan, AsyncGenerator<std::optional<ExecBatch>> gen) {
156 RETURN_NOT_OK(plan->Validate());
157 plan->StartProducing();
158
159 auto collected_fut = CollectAsyncGenerator(gen);
160
161 return AllFinished({plan->finished(), Future<>(collected_fut)})
162 .Then([collected_fut]() -> Result<std::vector<ExecBatch>> {
163 ARROW_ASSIGN_OR_RAISE(auto collected, collected_fut.result());
164 return ::arrow::internal::MapVector(
165 [](std::optional<ExecBatch> batch) { return batch.value_or(ExecBatch()); },
166 std::move(collected));
167 });
168}
169
170namespace {
171

Callers 5

BM_Tpch_Q1Function · 0.70
TESTFunction · 0.70
BenchmarkNodeOverheadFunction · 0.70
CheckRunOutputMethod · 0.70
GenerateTableFunction · 0.70

Calls 8

CollectAsyncGeneratorFunction · 0.85
AllFinishedFunction · 0.85
MapVectorFunction · 0.85
ThenMethod · 0.80
finishedMethod · 0.80
ExecBatchFunction · 0.50
ValidateMethod · 0.45
StartProducingMethod · 0.45

Tested by

no test coverage detected