alamb commented on code in PR #8931:
URL: https://github.com/apache/arrow-rs/pull/8931#discussion_r2565717519


##########
arrow-ipc/src/reader.rs:
##########
@@ -569,7 +569,13 @@ impl<'a> RecordBatchDecoder<'a> {
     }
 
     fn next_buffer(&mut self) -> Result<Buffer, ArrowError> {
-        read_buffer(self.buffers.next().unwrap(), self.data, self.compression)
+        read_buffer(
+            self.buffers.next().ok_or_else(|| {

Review Comment:
   I agree with @tustvold  we should have a test if possible
   
   Also, can we make the error more specific? It seems like the error is that 
there are fewer buffers than expected



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