jp0317 commented on code in PR #6738:
URL: https://github.com/apache/arrow-rs/pull/6738#discussion_r1847583575


##########
parquet/src/thrift.rs:
##########
@@ -67,7 +67,17 @@ impl<'a> TCompactSliceInputProtocol<'a> {
         let mut shift = 0;
         loop {
             let byte = self.read_byte()?;
-            in_progress |= ((byte & 0x7F) as u64) << shift;
+            let val = (byte & 0x7F) as u64;
+            let val = val.checked_shl(shift).map_or_else(

Review Comment:
   i'm afraid wrapping might cause correctness issues...besides, would the 
checked_shl really make a noticeable performance difference here?



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