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

Method ScanFragments

cpp/src/arrow/dataset/scan_node.cc:423–437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421 };
422
423 void ScanFragments(const AsyncGenerator<std::shared_ptr<Fragment>>& frag_gen) {
424 std::shared_ptr<util::AsyncTaskScheduler> fragment_tasks =
425 util::MakeThrottledAsyncTaskGroup(
426 plan_->query_context()->async_scheduler(), options_.fragment_readahead + 1,
427 /*queue=*/nullptr,
428 [this]() { return output_->InputFinished(this, num_batches_.load()); });
429 fragment_tasks->AddAsyncGenerator<std::shared_ptr<Fragment>>(
430 frag_gen,
431 [this, fragment_tasks =
432 std::move(fragment_tasks)](const std::shared_ptr<Fragment>& fragment) {
433 fragment_tasks->AddTask(std::make_unique<ListFragmentTask>(this, fragment));
434 return Status::OK();
435 },
436 "ScanNode::ListDataset::Next");
437 }
438
439 Status StartProducing() override {
440 NoteStartProducing(ToStringExtra());

Callers

nothing calls this directly

Calls 6

query_contextMethod · 0.80
OKFunction · 0.50
InputFinishedMethod · 0.45
loadMethod · 0.45
AddTaskMethod · 0.45

Tested by

no test coverage detected