neilconway opened a new pull request, #11355:
URL: https://github.com/apache/arrow-rs/pull/11355

   # Which issue does this PR close?
   
   - N/A
   
   # Rationale for this change
   
   `cast_list_to_list_view` built its result with `GenericListViewArray::new`, 
which panics if the ListViewArray would be invalid. This meant that casting to 
a `ListView` with a non-nullable field panicked if the input contained a null 
element, rather than returning an error.
   
   # What changes are included in this PR?
   
   * Use `try_new` instead of `new`, matching other casts
   * Add unit test
   
   # Are these changes tested?
   
   Yes; existing tests pass, new test added.
   
   # Are there any significant 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