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

Function StartAndCollect

cpp/src/arrow/dataset/test_util_internal.cc:131–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131Future<std::vector<ExecBatch>> StartAndCollect(
132 ExecPlan* plan, AsyncGenerator<std::optional<ExecBatch>> gen) {
133 RETURN_NOT_OK(plan->Validate());
134 plan->StartProducing();
135
136 auto collected_fut = CollectAsyncGenerator(gen);
137
138 return AllFinished({plan->finished(), Future<>(collected_fut)})
139 .Then([collected_fut]() -> Result<std::vector<ExecBatch>> {
140 ARROW_ASSIGN_OR_RAISE(auto collected, collected_fut.result());
141 return ::arrow::internal::MapVector(
142 [](std::optional<ExecBatch> batch) { return batch.value_or(ExecBatch()); },
143 std::move(collected));
144 });
145}
146
147Result<std::shared_ptr<Table>> SortTableOnAllFields(const std::shared_ptr<Table>& tab) {
148 std::vector<SortKey> sort_keys;

Callers

nothing calls this directly

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