ming08108 commented on code in PR #4165:
URL: https://github.com/apache/arrow-rs/pull/4165#discussion_r1185638800


##########
arrow-ipc/src/reader.rs:
##########
@@ -1117,7 +1117,29 @@ impl<R: Read> StreamReader<R> {
         reader: R,
         projection: Option<Vec<usize>>,
     ) -> Result<Self, ArrowError> {
-        let mut reader = BufReader::new(reader);
+        Self::try_new_unbuffered(BufReader::new(reader), projection)
+    }
+
+    /// Gets a reference to the underlying reader.
+    ///
+    /// It is inadvisable to directly read from the underlying reader.
+    pub fn get_ref(&self) -> &R {
+        self.reader.get_ref()
+    }
+
+    /// Gets a mutable reference to the underlying reader.
+    ///
+    /// It is inadvisable to directly read from the underlying reader.
+    pub fn get_mut(&mut self) -> &mut R {
+        self.reader.get_mut()
+    }
+}
+
+impl<R: Read> StreamReader<R> {
+    pub fn try_new_unbuffered(

Review Comment:
   Added.



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