alamb commented on code in PR #6252:
URL: https://github.com/apache/arrow-datafusion/pull/6252#discussion_r1189255070


##########
datafusion/core/src/physical_plan/file_format/csv.rs:
##########
@@ -221,23 +221,21 @@ impl CsvConfig {
 }
 
 impl CsvConfig {
-    fn open<R: std::io::Read>(&self, reader: R) -> csv::Reader<R> {
-        let datetime_format = None;
-        csv::Reader::new(
-            reader,
-            Arc::clone(&self.file_schema),
-            self.has_header,
-            Some(self.delimiter),
-            self.batch_size,
-            None,
-            self.file_projection.clone(),
-            datetime_format,
-        )
+    fn open<R: std::io::Read>(&self, reader: R) -> Result<csv::Reader<R>> {
+        let mut builder = csv::ReaderBuilder::new(self.file_schema.clone())

Review Comment:
   this is certainly a nicer API



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to