Skip to content

Add RowSelection::intersection #3003

@alamb

Description

@alamb

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
While @Ted-Jiang was working on apache/datafusion#3967 he needed code to intersect two row selections:

// combine two `RowSelection` return the intersection
// For example:
// self:     NNYYYYNNY
// other:    NYNNNNNNY
//
// returned: NNNNNNNNY
// set `need_combine` true will combine result: Select(2) + Select(1) + Skip(2) -> Select(3) + Skip(2)

The code and tests are in DataFusion

Describe the solution you'd like
I would like to code and tests brought to arrow-rs

see pub(crate) fn intersect_row_selection( specifically

Describe alternatives you've considered
Leave in DataFusion

Additional context

Metadata

Metadata

Assignees

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