Repository navigation
fix(arrow-select): handle all-empty run arrays in concat_run_arrays - #10782
Merged
alamb merged 3 commits intoAug 24, 2026
Merged
Conversation
concat_run_arrays filters out any input RunArray whose run_ends() is empty before concatenating their values. When every input is filtered out this way (e.g. concatenating two zero-length slices of a nested RunEndEncoded struct field), the resulting values_slices is empty and falls through to concat(&[]), which errors because a type-erased &[&dyn Array] with no elements carries no DataType to build a result from. Add an early return for the empty-after-filter case, building a valid zero-length array from the original (non-empty) input's DataType instead.
Contributor
|
cc @alamb |
3 of 11 tasks
Jefffrey
reviewed
Aug 22, 2026
Co-authored-by: Jeffrey Vo <[email protected]>
Co-authored-by: Jeffrey Vo <[email protected]>
Contributor
|
I also think all @Jefffrey 's comments have been addressed so am merging this one in |
Contributor
alamb
added a commit
that referenced
this pull request
Aug 25, 2026
…n arrays (#10828) # Which issue does this PR close? - part of #10738 # Rationale for this change Backport the fix for `concat_run_arrays` erroring when every input RunArray has empty run_ends (#10781) to the `59_maintenance` branch so it is included in the 59.3.0 release. # What changes are included in this PR? Backport / Cherry-pick: - #10782 # Are these changes tested? By CI # Are there any user-facing changes? No Co-authored-by: Thor <[email protected]> Co-authored-by: Jeffrey Vo <[email protected]>
Rich-T-kid
pushed a commit
to Rich-T-kid/arrow-rs
that referenced
this pull request
Aug 28, 2026
…pache#10782) concat_run_arrays filters out any input RunArray whose run_ends() is empty before concatenating their values. When every input is filtered out this way (e.g. concatenating two zero-length slices of a nested RunEndEncoded struct field), the resulting values_slices is empty and falls through to concat(&[]), which errors because a type-erased &[&dyn Array] with no elements carries no DataType to build a result from. Add an early return for the empty-after-filter case, building a valid zero-length array from the original (non-empty) input's DataType instead. # Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. --> - Closes apache#10781. # Rationale for this change `concat_run_arrays` should return a valid array instead of an error when empty run_ends are passed into it. # What changes are included in this PR? A small empty run arrays check that returns an empty array of the data type instead. # Are these changes tested? Yes a unit test was added # Are there any user-facing changes? No --------- Co-authored-by: Jeffrey Vo <[email protected]>
Rich-T-kid
pushed a commit
to Rich-T-kid/arrow-rs
that referenced
this pull request
Sep 2, 2026
…pache#10782) concat_run_arrays filters out any input RunArray whose run_ends() is empty before concatenating their values. When every input is filtered out this way (e.g. concatenating two zero-length slices of a nested RunEndEncoded struct field), the resulting values_slices is empty and falls through to concat(&[]), which errors because a type-erased &[&dyn Array] with no elements carries no DataType to build a result from. Add an early return for the empty-after-filter case, building a valid zero-length array from the original (non-empty) input's DataType instead. # Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. --> - Closes apache#10781. # Rationale for this change `concat_run_arrays` should return a valid array instead of an error when empty run_ends are passed into it. # What changes are included in this PR? A small empty run arrays check that returns an empty array of the data type instead. # Are these changes tested? Yes a unit test was added # Are there any user-facing changes? No --------- Co-authored-by: Jeffrey Vo <[email protected]>
Rich-T-kid
pushed a commit
to Rich-T-kid/arrow-rs
that referenced
this pull request
Sep 18, 2026
…pache#10782) concat_run_arrays filters out any input RunArray whose run_ends() is empty before concatenating their values. When every input is filtered out this way (e.g. concatenating two zero-length slices of a nested RunEndEncoded struct field), the resulting values_slices is empty and falls through to concat(&[]), which errors because a type-erased &[&dyn Array] with no elements carries no DataType to build a result from. Add an early return for the empty-after-filter case, building a valid zero-length array from the original (non-empty) input's DataType instead. # Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. --> - Closes apache#10781. # Rationale for this change `concat_run_arrays` should return a valid array instead of an error when empty run_ends are passed into it. # What changes are included in this PR? A small empty run arrays check that returns an empty array of the data type instead. # Are these changes tested? Yes a unit test was added # Are there any user-facing changes? No --------- Co-authored-by: Jeffrey Vo <[email protected]>
Rich-T-kid
pushed a commit
to Rich-T-kid/arrow-rs
that referenced
this pull request
Sep 21, 2026
…pache#10782) concat_run_arrays filters out any input RunArray whose run_ends() is empty before concatenating their values. When every input is filtered out this way (e.g. concatenating two zero-length slices of a nested RunEndEncoded struct field), the resulting values_slices is empty and falls through to concat(&[]), which errors because a type-erased &[&dyn Array] with no elements carries no DataType to build a result from. Add an early return for the empty-after-filter case, building a valid zero-length array from the original (non-empty) input's DataType instead. # Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. --> - Closes apache#10781. # Rationale for this change `concat_run_arrays` should return a valid array instead of an error when empty run_ends are passed into it. # What changes are included in this PR? A small empty run arrays check that returns an empty array of the data type instead. # Are these changes tested? Yes a unit test was added # Are there any user-facing changes? No --------- Co-authored-by: Jeffrey Vo <[email protected]>
Rich-T-kid
pushed a commit
to Rich-T-kid/arrow-rs
that referenced
this pull request
Sep 25, 2026
…pache#10782) concat_run_arrays filters out any input RunArray whose run_ends() is empty before concatenating their values. When every input is filtered out this way (e.g. concatenating two zero-length slices of a nested RunEndEncoded struct field), the resulting values_slices is empty and falls through to concat(&[]), which errors because a type-erased &[&dyn Array] with no elements carries no DataType to build a result from. Add an early return for the empty-after-filter case, building a valid zero-length array from the original (non-empty) input's DataType instead. # Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. --> - Closes apache#10781. # Rationale for this change `concat_run_arrays` should return a valid array instead of an error when empty run_ends are passed into it. # What changes are included in this PR? A small empty run arrays check that returns an empty array of the data type instead. # Are these changes tested? Yes a unit test was added # Are there any user-facing changes? No --------- Co-authored-by: Jeffrey Vo <[email protected]>
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.
concat_run_arrays filters out any input RunArray whose run_ends() is empty before concatenating their values. When every input is filtered out this way (e.g. concatenating two zero-length slices of a nested RunEndEncoded struct field), the resulting values_slices is empty and falls through to concat(&[]), which errors because a type-erased &[&dyn Array] with no elements carries no DataType to build a result from.
Add an early return for the empty-after-filter case, building a valid zero-length array from the original (non-empty) input's DataType instead.
Which issue does this PR close?
Rationale for this change
concat_run_arraysshould return a valid array instead of an error when empty run_ends are passed into it.What changes are included in this PR?
A small empty run arrays check that returns an empty array of the data type instead.
Are these changes tested?
Yes a unit test was added
Are there any user-facing changes?
No