LiaCastaneda opened a new issue, #20502: URL: https://github.com/apache/datafusion/issues/20502
### Describe the bug The following query is failing with the following error: `SELECT date_bin(NULL, TIMESTAMP '2023-01-01 12:30:00', TIMESTAMP '2023-01-01 12:00:00') ` `Error: Error during planning: Failed to coerce arguments to satisfy a call to 'date_bin' function: coercion from Null, Timestamp(ns), Timestamp(ns) to the signature OneOf([....])` This is happening because NULL can not be matched to any of date_bin signatures, even though NULL can be casted to Interval in Arrow and every other type (integers, timestamps, floats) already had Null in its coercion rule. The standard PostgreSQL beaviour is to return NULL: https://www.db-fiddle.com/f/gpH2LkcVm2HrciT8ZzLLYU/0 ### To Reproduce _No response_ ### Expected behavior _No response_ ### 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]
