You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "alexanderbianchi (via GitHub)" <gi...@apache.org> on 2025/06/09 21:29:27 UTC

[I] array_concat fails with when passed NULL list literals [datafusion]

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-unsubscribe@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] array_concat fails with when passed NULL list literals [datafusion]

Posted by "alexanderbianchi (via GitHub)" <gi...@apache.org>.
alexanderbianchi commented on issue #16349:
URL: https://github.com/apache/datafusion/issues/16349#issuecomment-2957199931

   take


-- 
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-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] array_concat fails with when passed NULL list literals [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #16349: array_concat fails with when passed NULL list literals
URL: https://github.com/apache/datafusion/issues/16349


-- 
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-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org