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

   ### Is your feature request related to a problem or challenge?
   
   We cant deal with empty array for these three array function
   
   # Result
   ```text
   query ?
   select array_union([], []);
   ----
   NULL
   
   query ?
   select array_except([], []);
   ----
   NULL
   
   query error
   select array_intersect([], []);
   ----
   DataFusion error: Optimizer rule 'simplify_expressions' failed
   caused by
   Internal error: could not cast value to 
arrow_array::array::list_array::GenericListArray<i32>.
   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
   ```text
   query ?
   select array_union([], []);
   ----
   []
   
   query ?
   select array_except([], []);
   ----
   []
   
   query error
   select array_intersect([], []);
   ----
   []
   ```
   
   ### Describe the solution you'd like
   
   Able to deal with empty array
   
   ### Describe alternatives you've considered
   
   None
   
   ### Additional context
   
   _No response_


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