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


##########
arrow-ipc/src/reader.rs:
##########
@@ -399,6 +431,13 @@ pub fn read_record_batch(
     let field_nodes = batch.nodes().ok_or_else(|| {
         ArrowError::IpcError("Unable to get field nodes from IPC 
RecordBatch".to_string())
     })?;
+
+    let mut variadic_counts: VecDeque<i64> = if let Some(v) = 
batch.variadicBufferCounts() {
+        v.iter().collect()
+    } else {
+        VecDeque::default()
+    };

Review Comment:
   ```suggestion
       let mut variadic_counts: VecDeque<i64> = 
batch.variadicBufferCounts().iter().flatten().collect()
   ```
   
   Or even



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