Jefffrey opened a new issue, #5557:
URL: https://github.com/apache/arrow-datafusion/issues/5557

   **Describe the bug**
   <!--
   A clear and concise description of what the bug is.
   -->
   
   If trying to get median on empty input/dataframe a confusing error is 
returned
   
   **To Reproduce**
   <!--
   Steps to reproduce the behavior:
   -->
   
   ```sql
   DataFusion CLI v20.0.0
   ❯ select median(a) from (select 1 as a where 1=0);
   Internal error: Empty iterator passed to ScalarValue::iter_to_array. This 
was likely caused by a bug in DataFusion's code and we would welcome that you 
file an bug report in our issue tracker
   ❯
   ```
   
   **Expected behavior**
   <!--
   A clear and concise description of what you expected to happen.
   -->
   
   Either return some sensible value (e.g. null) or a more informative error 
message
   
   **Additional context**
   <!--
   Add any other context about the problem here.
   -->
   
   This also affects the dataframe `describe(...)` method which uses median


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