2010YOUY01 opened a new issue, #16760: URL: https://github.com/apache/datafusion/issues/16760
### Describe the bug datafusion-cli is compiled from the latest main commit 4dd78255f ### To Reproduce ```sh DataFusion CLI v48.0.0 > SELECT NULL - DATE '1984-02-28'; Error during planning: Cannot coerce arithmetic expression Null - Date32 to valid types ``` ### Expected behavior `Null` should be interpreted as a missing value of Date32 type, so this query is valid and should return `Null` See result in DuckDB: ```sh D SELECT NULL - DATE '1984-02-28'; ┌─────────────────────────────────────┐ │ (NULL - CAST('1984-02-28' AS DATE)) │ │ int64 │ ├─────────────────────────────────────┤ │ │ └─────────────────────────────────────┘ ``` ### Additional context Found by SQLancer https://github.com/apache/datafusion/issues/11030 -- 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-unsubscr...@datafusion.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org