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 2022/11/03 23:41:53 UTC

[GitHub] [arrow-rs] marioloko commented on pull request #3013: Hadoop LZ4 Support for LZ4 Codec

marioloko commented on PR #3013:
URL: https://github.com/apache/arrow-rs/pull/3013#issuecomment-1302795393

   Another thing I notice with using `ReadOptionsPtr` is that even if we share the ownership of the pointer we need to take ownership of some of its values here:
   ```
       pub fn new_with_options(chunk_reader: R, options: ReadOptions) -> Result<Self> {
           let metadata = footer::parse_metadata(&chunk_reader)?;
           let mut predicates = options.predicates;
   ```
   
   Of course these options are not used anymore at this point, so instead of cloning the vector of predicates we can just take it.
   ```
       pub fn new_with_options(chunk_reader: R, options: ReadOptions) -> Result<Self> {
           let metadata = footer::parse_metadata(&chunk_reader)?;
           let mut predicates = std::men::take(&mut options.predicates);
   ```


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