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

   **Describe the bug**
   `make_array()` will error if the types can not be coerced to a common type, 
as in postgres and spark
   
   **To Reproduce**
   
   Run this query (see `query_array_scalar_coerce` test added in 
https://github.com/apache/arrow-datafusion/pull/3122)
   
   ```sql
   SELECT [1, 2, '3']
   ```
   
   This results in an error:
   
   ```
   "Error during planning: Coercion from [Int64, Int64, Utf8] to the signature 
VariadicEqual failed.",);
   ```
   
   **Expected behavior**
   I expect this to return like postgres where it has coerced all the arguments 
to int (tried to coerce all arguments to the same type as the first, which in 
this case is `1` and thus `int`
   
   ```shell
   alamb=# select array[1, 2, '3'];
     array  
   ---------
    {1,2,3}
   (1 row)
   ```
   
   
   **Additional context**
   Found in https://github.com/apache/arrow-datafusion/pull/3122


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