HippoBaro commented on code in PR #11517:
URL: https://github.com/apache/arrow-rs/pull/11517#discussion_r4316538243


##########
parquet/src/encodings/rle.rs:
##########


Review Comment:
   @etseidl thanks for the ping. I think the test should be rewritten so it 
tests the spec conforming boundary instead:
   
   ```suggestion
   #[test]
   fn test_skip_and_count_long_run() {
      let mut writer = BitWriter::new(8);
      writer.put_vlq_int(MAX_RUN_LEN << 1);
      writer.put_aligned(1_u8, 1);
   
      let mut decoder = RleDecoder::new(1);
      decoder.set_data(writer.consume().into()).unwrap();
   
      // Must not expand this run or allocate scratch space proportional to it.
      assert_eq!(
          decoder.skip_and_count(usize::MAX, 1_u64).unwrap(),
          (MAX_RUN_LEN as usize, MAX_RUN_LEN as usize)
      );
      assert_eq!(decoder.skip_and_count(1, 1_u64).unwrap(), (0, 0));
   }
   ```



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