Skip to content
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

Improve Parquet reader/writer properties docs #5863

Merged
merged 5 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
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
18 changes: 10 additions & 8 deletions parquet/src/arrow/arrow_reader/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,23 +239,25 @@ impl ArrowReaderOptions {
Self::default()
}

/// Parquet files generated by some writers may contain embedded arrow
/// schema and metadata. This may not be correct or compatible with your system.
///
/// For example:[ARROW-16184](https://issues.apache.org/jira/browse/ARROW-16184)
/// Skip decoding the embedded arrow metadata (defaults to `false`)
///
/// Set `skip_arrow_metadata` to true, to skip decoding this
/// Parquet files generated by some writers may contain embedded arrow
/// schema and metadata.
/// This may not be correct or compatible with your system,
/// for example: [ARROW-16184](https://issues.apache.org/jira/browse/ARROW-16184)
pub fn with_skip_arrow_metadata(self, skip_arrow_metadata: bool) -> Self {
Self {
skip_arrow_metadata,
..self
}
}

/// Set this true to enable decoding of the [PageIndex] if present. This can be used
/// to push down predicates to the parquet scan, potentially eliminating unnecessary IO
/// Enable decoding of the [`PageIndex`], if present (defaults to `false`)
///
/// The `PageIndex` can be used to push down predicates to the parquet scan,
/// potentially eliminating unnecessary IO, by some query engines.
///
/// [PageIndex]: https://github.com/apache/parquet-format/blob/master/PageIndex.md
/// [`PageIndex`]: https://github.com/apache/parquet-format/blob/master/PageIndex.md
pub fn with_page_index(self, page_index: bool) -> Self {
Self { page_index, ..self }
}
Expand Down
8 changes: 4 additions & 4 deletions parquet/src/arrow/arrow_writer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,20 +341,20 @@ impl ArrowWriterOptions {
Self { properties, ..self }
}

/// Skip encoding the embedded arrow metadata (defaults to `false`)
///
/// Parquet files generated by the [`ArrowWriter`] contain embedded arrow schema
/// by default.
///
/// Set `skip_arrow_metadata` to true, to skip encoding this.
/// Set `skip_arrow_metadata` to true, to skip encoding the embedded metadata.
pub fn with_skip_arrow_metadata(self, skip_arrow_metadata: bool) -> Self {
Self {
skip_arrow_metadata,
..self
}
}

/// Overrides the name of the root parquet schema element
///
/// Defaults to `"arrow_schema"`
/// Set the name of the root parquet schema element (defaults to `"arrow_schema"`)
pub fn with_schema_root(self, name: String) -> Self {
Self {
schema_root: Some(name),
Expand Down
Loading
Loading