| 129 | } |
| 130 | |
| 131 | Future<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 | |
| 147 | Result<std::shared_ptr<Table>> SortTableOnAllFields(const std::shared_ptr<Table>& tab) { |
| 148 | std::vector<SortKey> sort_keys; |
nothing calls this directly
no test coverage detected