| 332 | } |
| 333 | |
| 334 | static inline Result<std::shared_ptr<csv::StreamingReader>> OpenReader( |
| 335 | const FileSource& source, const CsvFileFormat& format, |
| 336 | const std::shared_ptr<ScanOptions>& scan_options = nullptr) { |
| 337 | auto open_reader_fut = OpenReaderAsync(source, format, scan_options, |
| 338 | ::arrow::internal::GetCpuThreadPool()); |
| 339 | return open_reader_fut.result(); |
| 340 | } |
| 341 | |
| 342 | static RecordBatchGenerator GeneratorFromReader( |
| 343 | const Future<std::shared_ptr<csv::StreamingReader>>& reader, int64_t batch_size) { |