tustvold commented on code in PR #3368:
URL: https://github.com/apache/arrow-rs/pull/3368#discussion_r1052534786


##########
arrow-csv/src/reader/mod.rs:
##########
@@ -325,14 +325,17 @@ pub fn infer_schema_from_files(
 // optional bounds of the reader, of the form (min line, max line).
 type Bounds = Option<(usize, usize)>;
 
+/// CSV file reader using [`std::io::BufReader`]
+pub type Reader<R> = BufReader<StdBufReader<R>>;
+
 /// CSV file reader
-pub struct Reader<R: Read> {
+pub struct BufReader<R> {
     /// Explicit schema for the CSV file
     schema: SchemaRef,
     /// Optional projection for which columns to load (zero-based column 
indices)
     projection: Option<Vec<usize>>,
     /// File reader
-    reader: RecordReader<BufReader<R>>,
+    reader: RecordReader<R>,

Review Comment:
   Because `BufRead != BufReader`, so previously it would use 
`RecordReader<BufReader<Cursor<Vec<u8>>>>` it will now use 
`RecordReader<Cursor<Vec<u8>>>` exploiting the fact that `Cursor<Vec<u8>>: 
BufRead`



-- 
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