Skip to content

Parquet: Add union method to RowSelection #6307

@sdd

Description

@sdd

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

RowSelection::intersection already exists for computing the intersection of two RowSelections. This is useful when you have a filter predicate that filters on two columns that have been AND'ed together and need the intersection of the RowSelection of each side of the AND.

Correspondingly, if you have a filter that is A OR B rather than A AND B, it is desirable to derive the union of the row selections of A and B.

Therefore I propose that RowSelection::union be added as a feature, to complement RowSelection::intersection.

Describe the solution you'd like

#3003 introduced RowSelection::intersection, for which #3047 was submitted and merged.

I will shortly be submitting a similar PR for RowSelection::union.

Describe alternatives you've considered

None

Additional context

I have a PR open on iceberg-rust, where I am using RowSelection::intersection but needed to implement a RowSelection union function myself. I think it makes more sense for it to live in here alongside intersection where others can make use of it too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAny new improvement worthy of a entry in the changelogparquetChanges to the parquet crate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions