| 344 | } |
| 345 | |
| 346 | static inline Result<std::shared_ptr<csv::StreamingReader>> OpenReader( |
| 347 | const FileSource& source, const CsvFileFormat& format, |
| 348 | const std::shared_ptr<ScanOptions>& scan_options = nullptr) { |
| 349 | auto open_reader_fut = OpenReaderAsync(source, format, scan_options, |
| 350 | ::arrow::internal::GetCpuThreadPool()); |
| 351 | return open_reader_fut.result(); |
| 352 | } |
| 353 | |
| 354 | static RecordBatchGenerator GeneratorFromReader( |
| 355 | const Future<std::shared_ptr<csv::StreamingReader>>& reader, int64_t batch_size) { |