etseidl commented on issue #7739:
URL: https://github.com/apache/arrow-rs/issues/7739#issuecomment-4179037656

   > so this magic number of 8 seems to be a convention and not part of the 
spec. means we can definitely tune it, but needs a interface to expose this 
configuration
   
   Coming late to this, but the reason for 8 does come from the 
[spec](https://github.com/apache/parquet-format/blob/master/Encodings.md#run-length-encoding--bit-packing-hybrid-rle--3).
 Specifically
   ```
   bit-packed-run := <bit-packed-header> <bit-packed-values>
   bit-packed-header := varint-encode(<bit-pack-scaled-run-len> << 1 | 1)
   // we always bit-pack a multiple of 8 values at a time, so we only store the 
number of values / 8
   bit-pack-scaled-run-len := (bit-packed-run-len) / 8
   ```
   This means you cannot have a bit-packed run of fewer than 8 elements.


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