neilconway opened a new issue, #22514: URL: https://github.com/apache/datafusion/issues/22514
### Describe the bug When `atan2` is invoked with integer arguments, the input is coerced to `Float32` (*not* `Float64` as the comments in the implementation suggest). This results in losing precision unnecessarily and produces inconsistent results with DuckDB and Postgres. ### To Reproduce ``` > select atan2(1, 1000000); +--------------------------------+ | atan2(Int64(1),Int64(1000000)) | +--------------------------------+ | 0.000001 | +--------------------------------+ 1 row(s) fetched. Elapsed 0.084 seconds. > select atan2(1.0, 1000000.0); +------------------------------------+ | atan2(Float64(1),Float64(1000000)) | +------------------------------------+ | 9.999999999996666e-7 | +------------------------------------+ 1 row(s) fetched. Elapsed 0.006 seconds. ``` ### Expected behavior DuckDB and Postgres both return `9.999999999996666e-7`, matching the DataFusion behavior for `Float64` input. ### Additional context _No response_ -- 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]
