You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "tustvold (via GitHub)" <gi...@apache.org> on 2023/04/25 11:08:46 UTC

[GitHub] [arrow-rs] tustvold commented on a diff in pull request #4122: feat: add get_{ref, mut} to arrow_ipc Reader and Writer

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


##########
arrow-ipc/src/reader.rs:
##########
@@ -1038,6 +1038,20 @@ impl<R: Read + Seek> FileReader<R> {
             ))),
         }
     }
+
+    /// 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.

Review Comment:
   :+1: 



##########
arrow-ipc/src/reader.rs:
##########
@@ -1038,6 +1038,20 @@ impl<R: Read + Seek> FileReader<R> {
             ))),
         }
     }
+
+    /// Gets a reference to the underlying reader.
+    ///
+    /// It is inadvisable to directly read from the underlying reader.

Review Comment:
   ```suggestion
   ```
   
   Reading requires mutable access so this comment is possibly redundant



##########
arrow-ipc/src/reader.rs:
##########
@@ -1243,6 +1257,20 @@ impl<R: Read> StreamReader<R> {
             )),
         }
     }
+
+    /// Gets a reference to the underlying reader.
+    ///
+    /// It is inadvisable to directly read from the underlying reader.

Review Comment:
   ```suggestion
   ```



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org