Skip to content

Minor: Add examples to ProjectionMask documentation #7523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions parquet/src/arrow/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,25 @@ pub const PARQUET_FIELD_ID_META_KEY: &str = "PARQUET:field_id";
///
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ProjectionMask {
/// If present a leaf column should be included if the value at
/// If `Some`, a leaf column should be included if the value at
/// the corresponding index is true
///
/// If `None`, include all columns
/// If `None`, all columns should be included
///
/// # Examples
///
/// Given the original parquet schema with leaf columns is `[a, b, c, d]`
///
/// A mask of `[true, false, true, false]` will result in a schema 2
/// elements long:
/// * `fields[0]`: `a`
/// * `fields[1]`: `c`
///
/// A mask of `None` will result in a schema 4 elements long:
/// * `fields[0]`: `a`
/// * `fields[1]`: `b`
/// * `fields[2]`: `c`
/// * `fields[3]`: `d`
mask: Option<Vec<bool>>,
}

Expand Down
Loading