haohuaijin commented on code in PR #10702:
URL: https://github.com/apache/arrow-rs/pull/10702#discussion_r3812297001
##########
parquet/src/arrow/arrow_reader/mod.rs:
##########
@@ -64,6 +64,109 @@ pub mod statistics;
/// Default batch size for reading parquet files
pub const DEFAULT_BATCH_SIZE: usize = 1024;
+/// A row group and its optional row-group-local [`RowSelection`].
+///
+/// A `None` selection reads the entire row group. Omitting a row group skips
+/// it. Entries are decoded in the supplied order.
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct RowGroupSelection {
+ pub(crate) row_group_index: usize,
+ pub(crate) selection: Option<RowSelection>,
+}
+
+impl RowGroupSelection {
+ /// Creates a row-group-local selection.
+ pub fn new(row_group_index: usize, selection: Option<RowSelection>) ->
Self {
+ Self {
+ row_group_index,
+ selection,
+ }
+ }
+
+ /// The index of the row group this selection applies to.
+ pub fn row_group_index(&self) -> usize {
+ self.row_group_index
+ }
+
+ /// The row-group-local selection, or `None` if the entire row group is
+ /// read.
+ pub fn selection(&self) -> Option<&RowSelection> {
+ self.selection.as_ref()
+ }
+}
+
+/// Row-selection configuration shared by the Arrow reader builders.
+///
+/// `Global` is the legacy configuration formed by `with_row_groups` and
Review Comment:
thank you, i added the docs for each enum
--
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]