raghavyadav01 opened a new issue, #27223:
URL: https://github.com/apache/datafusion/issues/27223

   ### Describe the bug
   
   For a row where both arguments are NULL, `array_concat(<2D list>, <1D 
list>)` returns `[NULL]` when the batch also has a non-NULL row, and `NULL` 
when that row is evaluated on its own. The same row should give the same result 
regardless of batch contents. `array_concat` of two 1D lists returns `NULL` in 
both cases.
   
   ### To Reproduce
   
   ```sql
   CREATE TABLE t AS VALUES
     (make_array(1, 2), make_array(make_array(30, 40))),
     (CAST(NULL AS INT[]), CAST(NULL AS INT[][]));
   
   SELECT array_concat(column2, column1) FROM t;
   -- [[30, 40], [1, 2]]
   -- [NULL]
   
   SELECT array_concat(column2, column1) FROM t WHERE column1 IS NULL;
   -- NULL
   
   SELECT array_concat(column1, column1) FROM t;
   -- [1, 2, 1, 2]
   -- NULL
   ```
   
   On main (5191bcc46). It also shows up in `array_concat.slt:388` when the 
suite runs at batch size 1–3 (found while sweeping batch sizes for #26700).
   
   ### Expected behavior
   
   The all-NULL row returns `NULL` in both queries, like the 1D case.
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to