Repository navigation
Conversation
…rnels Add string_view and binary_view kernels for if_else, case_when, coalesce, and choose. Retain backing buffers and rebase selected view descriptors without copying out-of-line payloads. Cover scalar and sliced inputs, nulls, multiple buffers, nested condition offsets, invalid choose indices, and output lifetime after input release.
|
|
|
|
|
|
2 similar comments
|
|
|
|
umtong
marked this pull request as draft
October 26, 2026 19:55
umtong
marked this pull request as ready for review
October 26, 2026 21:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
The conditional compute functions currently have no matching kernels for
string_vieworbinary_view, even when every value argument has the same type. This implements the support requested in #55255.What changes are included in this PR?
This adds view kernels for
if_else,case_when,coalesce, andchoose. They copy the view descriptors, retain the backing buffers, and rebase buffer indices so selected out-of-line values remain valid after the inputs are released. Scalar conditions and leading non-null coalesce arguments keep the existing forwarding paths.The tests extend the existing binary-type cases and cover scalar/array combinations, empty and sliced inputs, multiple backing buffers, nulls, nested condition offsets, invalid choose indices, and output lifetime after releasing the inputs.
Are these changes tested?
NotImplemented: no kernel matching input types.arrow-compute-scalar-if-else-testpass across 140 suites.CHECKINwarnings (-Werror).git diff --checkpasses.Build, baseline reproduction, and full conditional test run · Formatting
Are there any user-facing changes?
The four functions now accept same-type
string_viewandbinary_viewvalue arguments.Fixes #55255.
Was AI used for this PR?
AI was used for the implementation, regression tests, and PR description. The review covered buffer ownership and rebasing, slice offsets, null propagation, and index validation.
PR code and description written by:
Reviewed before submission by:
Assisted by Codex.