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


##########
parquet/src/util/bit_util.rs:
##########
@@ -429,7 +406,7 @@ impl BitReader {
 
         let mut values_to_read = batch.len();
         let needed_bits = num_bits * values_to_read;
-        let remaining_bits = (self.total_bytes - self.byte_offset) * 8 - 
self.bit_offset;
+        let remaining_bits = (self.buffer.len() - self.byte_offset) * 8 - 
self.bit_offset;

Review Comment:
   The logic on the next line, and similar variants of it. We only read a 
number of bits based on what remains



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