thorfour opened a new pull request, #10782:
URL: https://github.com/apache/arrow-rs/pull/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 #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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to