XiangpengHao commented on code in PR #5525:
URL: https://github.com/apache/arrow-rs/pull/5525#discussion_r1532784592


##########
arrow-ipc/src/reader.rs:
##########
@@ -79,6 +83,16 @@ fn create_array(reader: &mut ArrayReader, field: &Field) -> 
Result<ArrayRef, Arr
                 reader.next_buffer()?,
             ],
         ),
+        BinaryView | Utf8View => {
+            let count = variadic_counts
+                .pop_front()
+                .ok_or(ArrowError::IpcError("Incorrect variadic 
count!".to_owned()))?;
+            let count = count + 2; // view and null buffer.
+            let buffers = (0..count)
+                .map(|_| reader.next_buffer())
+                .collect::<Result<Vec<_>, _>>()?;
+            create_primitive_array(reader.next_node(field)?, data_type, 
&buffers)

Review Comment:
   The `reader.next_buffer()` returns the `Result<Buffer, ArrowError>` which 
already checked whether we have buffers up to `count`



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