Veeupup commented on issue #8181:
URL: 
https://github.com/apache/arrow-datafusion/issues/8181#issuecomment-1817737108

   FYI. I have tried these functions locally, I find that these functions can 
handle empty arrays but not `List(NullArray)`
   ```rust
   
   ❯ select array_union(make_array([]), make_array([]));
   
+--------------------------------------------------------------------------------+
   | 
array_union(make_array(List([NullArray(0)])),make_array(List([NullArray(0)]))) |
   
+--------------------------------------------------------------------------------+
   | []                                                                         
    |
   
+--------------------------------------------------------------------------------+
   1 row in set. Query took 0.002 seconds.
   
   ❯ select array_intersect(make_array([]), make_array([]));
   
+------------------------------------------------------------------------------------+
   | 
array_intersect(make_array(List([NullArray(0)])),make_array(List([NullArray(0)])))
 |
   
+------------------------------------------------------------------------------------+
   | []                                                                         
        |
   
+------------------------------------------------------------------------------------+
   1 row in set. Query took 0.002 seconds.
   
   ❯ select array_except(make_array([]), make_array([]));
   
+---------------------------------------------------------------------------------+
   | 
array_except(make_array(List([NullArray(0)])),make_array(List([NullArray(0)]))) 
|
   
+---------------------------------------------------------------------------------+
   | []                                                                         
     |
   
+---------------------------------------------------------------------------------+
   1 row in set. Query took 0.002 seconds.
   ```
   
   but if we just use `[]`, it will be converted to 
   
   ```rust
   ❯ select [];
   +----------------------+
   | List([NullArray(0)]) |
   +----------------------+
   +----------------------+
   0 rows in set. Query took 0.001 seconds.
   ```
   


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