You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/09/02 01:37:52 UTC

[GitHub] [arrow-datafusion] comphead commented on issue #3170: `array[]` / `make_array()` will error if the types can not be coerced to a common type

comphead commented on issue #3170:
URL: https://github.com/apache/arrow-datafusion/issues/3170#issuecomment-1234969752

   @alamb I checked 3 options
   
   ```
   DataFusion CLI v11.0.0
   ❯ select make_array(1,2,'3');
   +----------------------------------------+
   | makearray(Int64(1),Int64(2),Utf8("3")) |
   +----------------------------------------+
   | [1, 2, 3]                              |
   +----------------------------------------+
   1 row in set. Query took 0.006 seconds.
   ❯ select [1, 2, '3'];
   NotImplemented("Arrays with different types are not supported: {Int64, Utf8}")
   ❯ select array[1,2,'3'];
   NotImplemented("Arrays with different types are not supported: {Utf8, Int64}") 
   ```
   here I can see nonconsistent behaviuor. I suppose all 3 should try coerce to first datatype and fail if its not possible? 
   
   


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

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