You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/12/19 21:51:55 UTC

[GitHub] [arrow-rs] tustvold opened a new issue #1061: RleDecoder Inline Buffer

tustvold opened a new issue #1061:
URL: https://github.com/apache/arrow-rs/issues/1061


   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   
   `RleDecoder` has an buffer inlined within the struct [here](https://github.com/apache/arrow-rs/blob/99b7d01103495607932343146c973b6fba0eb8d5/parquet/src/encodings/rle.rs#L322). This is perhaps surprising as it results in a struct that is 4Kb in size, with all the implications that has for the cost of moves, etc...
   
   I only noticed this because clippy's [large enum variant lint](https://github.com/rust-lang/rust-clippy/blob/master/clippy_lints/src/large_enum_variant.rs) tripped whilst working on #1054.
   
   My solution there was to use `Box<RleDecoder>` but I think it might be better to heap allocate this buffer, especially since it is only used by `RleDecoder::get_batch_with_dict` which may not even be called.
   
   **Describe the solution you'd like**
   
   Change the type of `index_buf` from `[i32; 1024]` to `Option<Box<[i32; 1024]>>`
   
   **Describe alternatives you've considered**
   
   It could be left unchanged
   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow-rs] alamb closed issue #1061: RleDecoder Inline Buffer

Posted by GitBox <gi...@apache.org>.
alamb closed issue #1061:
URL: https://github.com/apache/arrow-rs/issues/1061


   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org