alamb commented on code in PR #9955:
URL: https://github.com/apache/arrow-rs/pull/9955#discussion_r3277092711
##########
parquet/src/arrow/arrow_writer/byte_array.rs:
##########
@@ -165,7 +165,7 @@ impl FallbackEncoder {
}
/// Encode `values` to the in-progress page
- fn encode<T>(&mut self, values: T, indices: &[usize])
+ fn encode<T>(&mut self, values: T, indices: impl ExactSizeIterator<Item =
usize>)
Review Comment:
I was missing the bigger picture here -- specifically I couldn't figure out
why you wanted to make this generic (and when would it be better than
`&[usize]`)? It looked to me like all the callsites are passing in `&[usize]`
anyways -- so it is not clear to me what benefit the extra templating achieves
However, after asking Claude, it seems the answer is that making this PR
generic avoids collecting a `Vec` in the next PR in the series -- specifically
avoiding the `non_null_indices: Vec<usize>` in
- https://github.com/apache/arrow-rs/pull/9653
--
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]