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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]