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

   ### Describe the bug
   
   The user @parkma99 first implemented the mechanism of operation of the 
function `array_concat` with empty arrays. But current implementation does not 
support nested empty arrays.
   
   ### To Reproduce
   
   ```
   ❯ select array_concat(make_array(make_array(1, 2), make_array(3, 4)), 
make_array(make_array()));
   
+----------------------------------------------------------------------------------------------------------------+
   | 
array_concat(make_array(make_array(Int64(1),Int64(2)),make_array(Int64(3),Int64(4))),make_array(make_array()))
 |
   
+----------------------------------------------------------------------------------------------------------------+
   | [[1, 2], [3, 4], []]                                                       
                                    |
   
+----------------------------------------------------------------------------------------------------------------+
   ```
   
   ### Expected behavior
   
   ```
   ❯ select array_concat(make_array(make_array(1, 2), make_array(3, 4)), 
make_array(make_array()));
   
+----------------------------------------------------------------------------------------------------------------+
   | 
array_concat(make_array(make_array(Int64(1),Int64(2)),make_array(Int64(3),Int64(4))),make_array(make_array()))
 |
   
+----------------------------------------------------------------------------------------------------------------+
   | [[1, 2], [3, 4]]                                                           
                                    |
   
+----------------------------------------------------------------------------------------------------------------+
   ```
   The output should be similar to PostgreSQL.
   PostgreSQL:
   ```
   postgres=# select array_cat(array[array[1, 2], array[3, 4]], 
array[array[]::integer[], array[]::integer[], array[]::integer[]]);
      array_cat   
   ---------------
    {{1,2},{3,4}}
   (1 row)
   ```
   
   ### 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