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

Method ScanBatchesAsync

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

Source from the content-addressed store, hash-verified

395}
396
397Result<RecordBatchGenerator> CsvFileFormat::ScanBatchesAsync(
398 const std::shared_ptr<ScanOptions>& scan_options,
399 const std::shared_ptr<FileFragment>& file) const {
400 auto this_ = checked_pointer_cast<const CsvFileFormat>(shared_from_this());
401 auto source = file->source();
402 auto reader_fut =
403 OpenReaderAsync(source, *this, scan_options, ::arrow::internal::GetCpuThreadPool());
404 auto generator = GeneratorFromReader(std::move(reader_fut), scan_options->batch_size);
405 WRAP_ASYNC_GENERATOR_WITH_CHILD_SPAN(
406 generator, "arrow::dataset::CsvFileFormat::ScanBatchesAsync::Next");
407 return generator;
408}
409
410Future<std::optional<int64_t>> CsvFileFormat::CountRows(
411 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