Skip to content

Improve ArrowReaderBuilder::with_row_filter documentation#9153

Merged
alamb merged 4 commits intoapache:mainfrom
alamb:alamb/cleanups
Jan 14, 2026
Merged

Improve ArrowReaderBuilder::with_row_filter documentation#9153
alamb merged 4 commits intoapache:mainfrom
alamb:alamb/cleanups

Conversation

@alamb
Copy link
Copy Markdown
Contributor

@alamb alamb commented Jan 13, 2026

Which issue does this PR close?

Rationale for this change

@sonhmai started us off with #9115

@Jefffrey and I had some suggestions on the PR and I found some more while going through it again, so I figured I would make anew PR

What changes are included in this PR?

  1. Improve the documentation
  2. Improve the doc comment example
  3. Remove redundant example in parquet/examples/read_with_row_filter.rs

Are these changes tested?

By CI

Are there any user-facing changes?

@alamb alamb added the documentation Improvements or additions to documentation label Jan 13, 2026
@alamb alamb marked this pull request as ready for review January 13, 2026 13:47
@github-actions github-actions bot added the parquet Changes to the parquet crate label Jan 13, 2026
@@ -1,49 +0,0 @@
// Licensed to the Apache Software Foundation (ASF) under one
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

per https://github.com/apache/arrow-rs/pull/9115/changes#r2678450103 this is redundant with the doc example


/// Filter applied *during* the parquet read process
///
/// See example on [`ArrowReaderBuilder::with_row_filter`]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just trying to backlink to make it easier to find examples/how to configure this

/// let schema_desc = builder.metadata().file_metadata().schema_descr_ptr();
///
/// // Create predicate: column id > 4. This col has index 0.
/// // Create predicate that evaluates `int_col != 1`.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By using a column other than 0, we can illustrate the fact that the predicate is passed a record batch with a different schema

Copy link
Copy Markdown
Contributor

@etseidl etseidl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like an improvement to me. Just one nit.

Looks like I have to add a blog post to my read queue 🤣

Comment thread parquet/src/arrow/arrow_reader/mod.rs Outdated
Co-authored-by: Ed Seidl <etseidl@users.noreply.github.com>
@alamb alamb merged commit 156c941 into apache:main Jan 14, 2026
17 checks passed
@alamb
Copy link
Copy Markdown
Contributor Author

alamb commented Jan 14, 2026

Thanks again @etseidl and @Jefffrey

Dandandan pushed a commit to Dandandan/arrow-rs that referenced this pull request Jan 15, 2026
)

# Which issue does this PR close?

- part of apache#9096
- Follow on to apache#9115

# Rationale for this change

@sonhmai started us off with
apache#9115

@Jefffrey and I had some suggestions on the PR and I found some more
while going through it again, so I figured I would make anew PR

# What changes are included in this PR?

1. Improve the documentation
2. Improve the doc comment example
3. Remove redundant example in parquet/examples/read_with_row_filter.rs

# Are these changes tested?

By CI

# Are there any user-facing changes?

<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.

If there are any breaking changes to public APIs, please call them out.
-->

---------

Co-authored-by: Ed Seidl <etseidl@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation parquet Changes to the parquet crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants