viirya commented on code in PR #3368:
URL: https://github.com/apache/arrow-rs/pull/3368#discussion_r1052543648
##########
arrow-csv/src/reader/mod.rs:
##########
@@ -1041,10 +1044,15 @@ impl ReaderBuilder {
}
/// Create a new `Reader` from the `ReaderBuilder`
- pub fn build<R: Read + Seek>(
+ pub fn build<R: Read + Seek>(self, reader: R) -> Result<Reader<R>,
ArrowError> {
+ self.build_buffered(StdBufReader::new(reader))
+ }
+
+ /// Create a new `BufReader`
+ pub fn build_buffered<R: BufRead + Seek>(
mut self,
mut reader: R,
- ) -> Result<Reader<R>, ArrowError> {
+ ) -> Result<BufReader<R>, ArrowError> {
Review Comment:
Oh, I see. I didn't see `build_buffered` returns `BufReader<R>` instead of
`Reader<R>`. For `R` is a `BufRead` case, there is no more `std::io::BufReader`
under `RecordReader`.
--
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]