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

Method ScanBatchesAsync

cpp/src/arrow/dataset/file_test.cc:394–406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392 num_batches_(num_batches) {}
393
394 Result<RecordBatchGenerator> ScanBatchesAsync(
395 const std::shared_ptr<ScanOptions>& options) override {
396 // Fragment with start_=0 defers returning the generator
397 if (start_ == 0) {
398 std::this_thread::sleep_for(std::chrono::duration<double>(0.1));
399 }
400
401 auto vec = gen::Gen({gen::Step(start_)})
402 ->FailOnError()
403 ->RecordBatches(rows_per_batch_, num_batches_);
404 auto it = MakeVectorIterator(vec);
405 return MakeBackgroundGenerator(std::move(it), io::default_io_context().executor());
406 }
407
408 std::string type_name() const override { return "mock"; }
409

Callers

nothing calls this directly

Calls 7

StepFunction · 0.85
MakeVectorIteratorFunction · 0.85
MakeBackgroundGeneratorFunction · 0.85
FailOnErrorMethod · 0.80
GenFunction · 0.50
RecordBatchesMethod · 0.45
executorMethod · 0.45

Tested by

no test coverage detected