| 276 | } |
| 277 | |
| 278 | static inline Result<csv::ReadOptions> GetReadOptions( |
| 279 | const CsvFileFormat& format, const std::shared_ptr<ScanOptions>& scan_options) { |
| 280 | ARROW_ASSIGN_OR_RAISE( |
| 281 | auto csv_scan_options, |
| 282 | GetFragmentScanOptions<CsvFragmentScanOptions>( |
| 283 | kCsvTypeName, scan_options.get(), format.default_fragment_scan_options)); |
| 284 | auto read_options = csv_scan_options->read_options; |
| 285 | // Multithreaded conversion of individual files would lead to excessive thread |
| 286 | // contention when ScanTasks are also executed in multiple threads, so we disable it |
| 287 | // here. Also, this is a no-op since the streaming CSV reader is currently serial |
| 288 | read_options.use_threads = false; |
| 289 | return read_options; |
| 290 | } |
| 291 | |
| 292 | static inline Future<std::shared_ptr<csv::StreamingReader>> OpenReaderAsync( |
| 293 | const FileSource& source, const CsvFileFormat& format, |
nothing calls this directly
no outgoing calls
no test coverage detected