jayzhan211 commented on PR #23225:
URL: https://github.com/apache/datafusion/pull/23225#issuecomment-5814234679

   Thanks for the fix. We intend to follow Postgres/DuckDB here: an untyped 
string literal next to a numeric argument resolves to the numeric type, so 
`coalesce(1, '')` erroring on `''` is the expected outcome (Postgres also 
rejects `''` as an integer). This PR goes the other way, and because 
`type_union_resolution` is shared, it also changes VALUES, `make_array`, the 
array functions and Spark `if`. It breaks `array_cast.slt:41`, 
`array_position.slt:98,101`, `errors.slt:153`, and `select coalesce(bigint_col, 
'0') + 1` (which then fails with `Cannot coerce arithmetic expression Utf8 + 
Int64`).
   
   Closing in favor of keeping the current behavior; see the discussion on 
#23045.
   


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