tustvold commented on code in PR #3036:
URL: https://github.com/apache/arrow-rs/pull/3036#discussion_r1015006451
##########
parquet/src/encodings/rle.rs:
##########
@@ -473,13 +473,18 @@ impl RleDecoder {
let bit_reader =
self.bit_reader.as_mut().expect("bit_reader should be
set");
- let mut num_values =
- cmp::min(max_values - values_read, self.bit_packed_left as
usize);
-
- num_values = cmp::min(num_values, index_buf.len());
loop {
- num_values = bit_reader.get_batch::<i32>(
- &mut index_buf[..num_values],
+ let to_read = index_buf
Review Comment:
This is the fix for #3029
Effectively for runs longer than 1024 it would loop round again and attempt
to read a further 1024 values. This could lead to incorrect data and/or panics
--
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]