adriangb commented on code in PR #11235:
URL: https://github.com/apache/arrow-rs/pull/11235#discussion_r4141182271
##########
parquet/src/arrow/push_decoder/remaining.rs:
##########
@@ -122,6 +122,16 @@ impl QueuedRowGroups {
}
}
+ /// Returns `true` if `row_group_idx` is in the queue.
+ fn contains(&self, row_group_idx: usize) -> bool {
+ match self {
+ Self::Global { row_groups, .. } =>
row_groups.contains(&row_group_idx),
+ Self::PerRowGroup(row_groups) => row_groups
+ .iter()
+ .any(|row_group| row_group.row_group_index == row_group_idx),
+ }
+ }
Review Comment:
Yep, sent in 4613731. 88c197c also makes `PushBuffers::buffered_bytes` O(1),
which the memory accounting calls per batch.
--
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]