paddyhoran commented on a change in pull request #7004:
URL: https://github.com/apache/arrow/pull/7004#discussion_r421036704



##########
File path: rust/arrow/src/buffer.rs
##########
@@ -568,6 +568,25 @@ impl MutableBuffer {
     }
 }
 
+impl MutableBuffer {
+    /// Writes a byte slice to the underlying buffer and updates the `len`, 
i.e. the
+    /// number array elements in the builder.  Also, converts the `io::Result`
+    /// required by the `Write` trait to the Arrow `Result` type.
+    pub fn write_bytes(&mut self, bytes: &[u8], len_added: usize) -> 
Result<()> {
+        let write_result = self.write(bytes);
+        // `io::Result` has many options one of which we use, so pattern 
matching is
+        // overkill here
+        if write_result.is_err() {
+            Err(ArrowError::MemoryError(

Review comment:
       I'm fine with `IoError`, will change.




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

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


Reply via email to