EnricoMi commented on code in PR #7389:
URL: https://github.com/apache/arrow-rs/pull/7389#discussion_r2035891890


##########
parquet/src/file/serialized_reader.rs:
##########
@@ -452,21 +452,20 @@ pub(crate) fn decode_page(
     // maximum page header size and abort if that is exceeded.
     let buffer = match decompressor {
         Some(decompressor) if can_decompress => {
-            let uncompressed_size = page_header.uncompressed_page_size as 
usize;
-            let mut decompressed = Vec::with_capacity(uncompressed_size);
-            let compressed = &buffer.as_ref()[offset..];
+            let uncompressed_page_size = page_header.uncompressed_page_size as 
usize;

Review Comment:
   I have replaced `as usize` with `usize::try_from` in all unchecked places.



-- 
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: github-unsubscr...@arrow.apache.org

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

Reply via email to