Skip to content

Draft: SelectionSpan changes relative to upstream PR #47377 - #83

Draft
zanmato1984 wants to merge 21 commits into
fix/gh-47376from
draft/selection-span
Draft

zanmato1984 wants to merge 21 commits into
fix/gh-47376from
draft/selection-span

Conversation

@zanmato1984

Copy link
Copy Markdown
Owner

Review-only comparison of draft/selection-span against fix/apachegh-47376, the head branch of apache#47377. This PR is intended for inspecting the incremental diff, not for merging.

zanmato1984 added 18 commits May 7, 2026 00:04
Introduce SelectionSpan (ContiguousSpan / FilteredSpan / DiscreteSpan) for the scalar kernel selective_exec API.

Currently ExecSpanIterator only emits DiscreteSpan, but VisitSelectionSpanInline allows kernels and tests to handle additional shapes incrementally.

Also cast SelectionVector indices to int64 in the dense gather/execute/scatter fallback since Scatter requires signed indices.
Remove SelectionVectorSpan, use DiscreteSpan directly, emit ContiguousSpan for contiguous selections, and simplify VisitSelectionSpanInline with overload visitors.
- Hide selection backend behind PIMPL (indices/mask/ranges)

- Use backend-specific gather/scatter for selective dense fallback

- Normalize preallocation state + fix tests
- Deduplicate ApplySelectionMask for ArrayData/ArraySpan\n- Fix OUTPUT_NOT_NULL full-span validity init\n- Add unit test for OUTPUT_NOT_NULL selective exec
- Centralize SelectedCount/empty-span checks\n- Reduce scattered selection if/else in ScalarExecutor
@github-actions

Copy link
Copy Markdown

Thanks for opening a pull request!

This pull request has been automatically converted to a draft because its title doesn't match Arrow's required format.

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

After updating the title, you can mark the pull request as ready for review.

See also:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant