tustvold commented on code in PR #2890:
URL: https://github.com/apache/arrow-rs/pull/2890#discussion_r998571931
##########
parquet/src/encodings/rle.rs:
##########
@@ -101,29 +100,33 @@ impl RleEncoder {
/// Returns the minimum buffer size needed to use the encoder for
`bit_width`.
/// This is the maximum length of a single run for `bit_width`.
+ #[allow(unused)]
pub fn min_buffer_size(bit_width: u8) -> usize {
- let max_bit_packed_run_size = 1 + bit_util::ceil(
- (MAX_VALUES_PER_BIT_PACKED_RUN * bit_width as usize) as i64,
- 8,
- );
- let max_rle_run_size =
- bit_util::MAX_VLQ_BYTE_LEN + bit_util::ceil(bit_width as i64, 8)
as usize;
- std::cmp::max(max_bit_packed_run_size as usize, max_rle_run_size)
+ let b = bit_width as usize;
+ let max_bit_packed_run_size = 1 + MAX_GROUPS_PER_BIT_PACKED_RUN * b;
+ let max_rle_run_size = 1 + bit_util::ceil(b, 8);
Review Comment:
Tbh I don't really understand what this method was ever measuring... I will
just remove it
--
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]