alamb commented on code in PR #9746:
URL: https://github.com/apache/arrow-rs/pull/9746#discussion_r3106908692
##########
parquet/src/encodings/rle.rs:
##########
@@ -532,9 +555,14 @@ impl RleDecoder {
for (b, i) in out_chunks
.into_remainder()
.iter_mut()
- .zip(idx.chunks_exact(8).remainder().iter())
+ .zip(idx.chunks_exact(CHUNK).remainder().iter())
{
- b.clone_from(&dict[*i as usize]);
+ let dict_idx = *i as usize;
Review Comment:
it is fascinaing that the rust compiler doens't already do this
##########
parquet/src/encodings/rle.rs:
##########
@@ -484,7 +484,16 @@ impl RleDecoder {
if self.rle_left > 0 {
let num_values = cmp::min(max_values - values_read,
self.rle_left as usize);
let dict_idx = self.current_value.unwrap() as usize;
- let dict_value = dict[dict_idx].clone();
+ let dict_value = dict
Review Comment:
This is a nice change to return errors rather than panic on input
--
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]