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

Function GetReadOptions

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

Source from the content-addressed store, hash-verified

276}
277
278static 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
292static inline Future<std::shared_ptr<csv::StreamingReader>> OpenReaderAsync(
293 const FileSource& source, const CsvFileFormat& format,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected