alexanderbianchi opened a new issue, #16349: URL: https://github.com/apache/datafusion/issues/16349
### Describe the bug The array_concat function throws an Arrow compute error `concat requires input of at least one array` when called with NULL list literals (e.g., NULL::integer[]). The function incorrectly attempts to pass empty arrays to Arrow's concat function instead of recognizing that NULL list literals should be handled as null inputs. ### To Reproduce ``` -- This query should return NULL but throws an error instead SELECT array_concat(NULL::integer[]); -- These variations also fail: SELECT array_concat(NULL::integer[], NULL::integer[]); SELECT array_concat(NULL::text[]); SELECT array_concat(NULL::bigint[]); ``` ### Expected behavior The function should handle NULL list literals gracefully and return NULL, similar to how other array functions handle NULL inputs: ``` -- Should return: SELECT array_concat(NULL::integer[]); -- Expected: NULL SELECT array_concat(NULL::integer[], [1, 2, 3]); -- Expected: [1, 2, 3] SELECT array_concat(NULL::integer[], NULL::integer[]); -- Expected: NULL ``` ### Additional context DataFusion version: v48.0.0 (current main branch) Rust version: 1.87.0 -- 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: github-unsubscr...@datafusion.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org