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 union method to RowSelection #6308

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

sdd
Copy link
Contributor

@sdd sdd commented Aug 25, 2024

Complements the existing RowSelection::intersection method. Useful for OR-ing row selections together, complementing
the use of RowSelection::intersection for AND-ing row selections

Which issue does this PR close?

Closes #6307.

Are there any user-facing changes?

Yes. Doc comments for RowSelection::union have been added accordingly as part of this PR.

Complements the existing RowSelection::intersection method.
Useful for Or-ing row selections together, in contrast to
intersection's use when AND-ing selections
@github-actions github-actions bot added the parquet Changes to the parquet crate label Aug 25, 2024
@sdd sdd changed the title feat(parquet): add union method to RowSelection Parquet: add union method to RowSelection Aug 25, 2024
///
/// returned: NYYYYYNNYYNYN
pub fn union(&self, other: &Self) -> Self {
union_row_selections(&self.selectors, &other.selectors)
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need an indirection here? as far as I can tell, the called method isn't used anywhere else.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I based it on the intersection method, which has this structure. I'm not familiar with this code base and the design decisions so I just went with what was there. I can refactor if required.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair.

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.

Parquet: Add union method to RowSelection
2 participants