GrandChaman opened a new pull request, #4206:
URL: https://github.com/apache/arrow-datafusion/pull/4206

   # Which issue does this PR close?
   
   Closes #4080.
   
   # Rationale for this change
   
   I've noticed that some calls to `ScalarValue::iter_to_array` could have an 
empty iterator as argument, which caused an error. 
   
   # What changes are included in this PR?
   
   In 2 places I found out that sometimes, `ScalarValue::iter_to_array` is 
called with an empty iterator. I made sure to use 
`arrow::array::new_empty_array` in this case.
   
   # Are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are 
they covered by existing tests)?
   -->
   
   One of them is (the one about the `ScalarValue::List`).
   
   I didn't find a good way to test the other one, as it seems to require some 
more insights into how the aggregation works internally.
   
   # Are there any user-facing changes?
   
   No, and no breaking changes.


-- 
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