[59_maintenance] Backport fix for concat_run_arrays with all-empty run arrays - #10828
Open
alamb wants to merge 1 commit into
Open
[59_maintenance] Backport fix for concat_run_arrays with all-empty run arrays#10828alamb wants to merge 1 commit into
alamb wants to merge 1 commit into
Conversation
…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 <jeffrey.vo.australia@gmail.com> (cherry picked from commit 3577093)
This was referenced Aug 24, 2026
Rich-T-kid
approved these changes
Aug 24, 2026
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.
Which issue does this PR close?
59.3.0(August 2026) #10738Rationale for this change
Backport the fix for
concat_run_arrayserroring when every input RunArray has empty run_ends (#10781) to the59_maintenancebranch so it is included in the 59.3.0 release.What changes are included in this PR?
Backport / Cherry-pick:
Are these changes tested?
By CI
Are there any user-facing changes?
No