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

Method ScanBatchesAsync

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

Source from the content-addressed store, hash-verified

381}
382
383Result<RecordBatchGenerator> CsvFileFormat::ScanBatchesAsync(
384 const std::shared_ptr<ScanOptions>& scan_options,
385 const std::shared_ptr<FileFragment>& file) const {
386 auto this_ = checked_pointer_cast<const CsvFileFormat>(shared_from_this());
387 auto source = file->source();
388 auto reader_fut =
389 OpenReaderAsync(source, *this, scan_options, ::arrow::internal::GetCpuThreadPool());
390 auto generator = GeneratorFromReader(std::move(reader_fut), scan_options->batch_size);
391 WRAP_ASYNC_GENERATOR_WITH_CHILD_SPAN(
392 generator, "arrow::dataset::CsvFileFormat::ScanBatchesAsync::Next");
393 return generator;
394}
395
396Future<std::optional<int64_t>> CsvFileFormat::CountRows(
397 const std::shared_ptr<FileFragment>& file, compute::Expression predicate,

Callers

nothing calls this directly

Calls 4

GetCpuThreadPoolFunction · 0.85
GeneratorFromReaderFunction · 0.85
sourceMethod · 0.80
OpenReaderAsyncFunction · 0.70

Tested by

no test coverage detected