jp0317 commented on code in PR #6738:
URL: https://github.com/apache/arrow-rs/pull/6738#discussion_r1890399136
##########
parquet/src/thrift.rs:
##########
@@ -67,7 +67,7 @@ impl<'a> TCompactSliceInputProtocol<'a> {
let mut shift = 0;
loop {
let byte = self.read_byte()?;
- in_progress |= ((byte & 0x7F) as u64) << shift;
+ in_progress |= ((byte & 0x7F) as u64).wrapping_shl(shift);
Review Comment:
thanks for bringing this up! I'm not sure if `<<` is guaranteed to always
have the same behavior as `wrapping_shl`. On the other hand, imho this is not
really a logic bug, and the only benefit keeping `<<` is that debug mode can be
used to identify invalid inputs, but i'm not sure if anyone will rely on that
in practice.
--
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]