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

   ### Describe the bug
   
   `make_array` fails with an internal error when it's argument is NullArray
   
   ### To Reproduce
   
   ```
   ❯ datafusion-cli
   DataFusion CLI v53.1.0
   > select make_array(n) from (values (NULL), (NULL), (NULL)) as t(n);
   Internal error: UDF make_array returned a different number of rows than 
expected. Expected: 3, Got: 1.
   This issue was likely caused by a bug in DataFusion's code. Please help us 
to resolve this by filing a bug report in our issue tracker: 
https://github.com/apache/datafusion/issues
   ```
   
   ### Expected behavior
   
   This should be the result
   ```
   +-----------------+
   | make_array(t.n) |
   +-----------------+
   | [NULL]          |
   | [NULL]          |
   | [NULL]          |
   +-----------------+
   ```
   
   ### Additional context
   
   Expected behavior matches duckdb
   ```
   ❯ duckdb
   DuckDB v1.5.2 (Variegata)
   Enter ".help" for usage hints.
   memory D select [n] from (values (NULL), (NULL), (NULL)) as t(n);
   ┌────────────────────┐
   │ main.list_value(n) │
   │      int32[]       │
   ├────────────────────┤
   │ [NULL]             │
   │ [NULL]             │
   │ [NULL]             │
   └────────────────────┘
   ```


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