Rich-T-kid commented on code in PR #11012:
URL: https://github.com/apache/arrow-rs/pull/11012#discussion_r3946912516


##########
arrow-ipc/src/reader.rs:
##########
@@ -947,11 +945,37 @@ fn get_dictionary_values(
 
 /// Read the data for a given block
 fn read_block<R: Read + Seek>(mut reader: R, block: &Block) -> Result<Buffer, 
ArrowError> {
-    reader.seek(SeekFrom::Start(block.offset() as u64))?;
-    let body_len = block.bodyLength().to_usize().unwrap();
-    let metadata_len = block.metaDataLength().to_usize().unwrap();
-    let total_len = body_len.checked_add(metadata_len).unwrap();
+    let offset = u64::try_from(block.offset())

Review Comment:
   nit: might be worth placing all the parsing Errors into a anon function that 
takes in a string. either way otherwise this makes sense 👍 



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