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

[Parquet] Add projection utility functions #6931

Merged
merged 3 commits into from
Jan 4, 2025

Conversation

XiangpengHao
Copy link
Contributor

Which issue does this PR close?

Part of #6921

Rationale for this change

To implement row level filtering for Parquet, we need to cache columns that are being filtered, i.e., the column is both in filter's predicate projection and in final output projection.

This PR adds two utility functions to union and interset two projections.

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions bot added the parquet Changes to the parquet crate label Jan 2, 2025
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Looks great to me -- thank you @XiangpengHao

Comment on lines 287 to 290
/// Example:
/// mask1 = [true, false, true]
/// mask2 = [false, true, true]
/// union(mask1, mask2) = [true, true, true]
Copy link
Contributor

Choose a reason for hiding this comment

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

The rendered docs look.a bit off:
Screenshot 2025-01-03 at 5 58 49 AM

I pushed a commit to make them a bit nicer

Suggested change
/// Example:
/// mask1 = [true, false, true]
/// mask2 = [false, true, true]
/// union(mask1, mask2) = [true, true, true]
/// Example:
/// mask1 = [true, false, true]
/// mask2 = [false, true, true]
/// union(mask1, mask2) = [true, true, true]

@tustvold tustvold merged commit debc5bf into apache:main Jan 4, 2025
16 checks passed
@alamb
Copy link
Contributor

alamb commented Jan 4, 2025

Thank you @XiangpengHao and @tustvold

CurtHagenlocher pushed a commit to CurtHagenlocher/arrow-rs that referenced this pull request Jan 13, 2025
* projection utilities

* improve docs

---------

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parquet Changes to the parquet crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants