fix(arrow-select): preserve nullif nulls for REE and Union - #10991
Open
yongster wants to merge 1 commit into
Open
fix(arrow-select): preserve nullif nulls for REE and Union#10991yongster wants to merge 1 commit into
yongster wants to merge 1 commit into
Conversation
Jefffrey
reviewed
Sep 5, 2026
| return Ok(make_array(left_data)); | ||
| match left.data_type() { | ||
| DataType::RunEndEncoded(_, values) => { | ||
| if !values.is_nullable() && right.iter().any(|value| value == Some(true)) { |
Contributor
There was a problem hiding this comment.
Suggested change
| if !values.is_nullable() && right.iter().any(|value| value == Some(true)) { | |
| if !values.is_nullable() && right.has_true() { |
| } | ||
|
|
||
| /// Applies `nullif` to arrays that represent logical nulls in their children. | ||
| fn nullif_take(left: &dyn Array, right: &BooleanArray) -> Result<ArrayRef, ArrowError> { |
Contributor
There was a problem hiding this comment.
perhaps we can reuse the computation we do here:
arrow-rs/arrow-select/src/nullif.rs
Lines 58 to 71 in b372d1f
instead of needing to check validity in this iterator
Contributor
There was a problem hiding this comment.
- same fixes as fix(arrow-select): preserve nullability for REE and Union take #10994? should we wait for it to land first?
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.
nullifcreates nulls by adding a top-level validity bitmap. This works formost arrays, but RunEndEncoded and Union arrays derive logical nullability from
their child arrays instead.
As a result,
nullifpreviously returned non-null values at positions wherethe condition was true for these array types.
Closes #10990
nulliffor RunEndEncoded and Union arrays totake, using nullindices for the positions selected by the condition.
represent the requested nulls.
indices.
takeneeds to represent a null index.cases.