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/11/29 09:20:24 UTC

[GitHub] [arrow-datafusion] DDtKey opened a new issue, #4420: Incorrect error for timestampt and date plus/minus operations

DDtKey opened a new issue, #4420:
URL: https://github.com/apache/arrow-datafusion/issues/4420

   **Describe the bug**
   
   If you would try to perform plus/minus operation over `dates`/`timestamps` inside SQL it will return an error:
   ` X  - Y can't be evaluated because there isn't a common type to coerce the types to`
   
   It looks incorrect to me, it's more about unsupported operations (it works only with intervals), not coercion itself.
   
   Moreover it confuses me, because it could be the same types and error doesn't report the relevant reason.
   
   **To Reproduce**
   Just write SQL with this unsupported operation, like:
   `select now() - now() from x`
   
   **Expected behavior**
   It should returns clear error, like: `the Timestamp - Timestamp is unsupported operation`
   
   **Additional context**
   Here the current logic is: [Link to the related code](https://github.com/apache/arrow-datafusion/blob/master/datafusion/expr/src/type_coercion/binary.rs#L120-L130)
   


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

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


[GitHub] [arrow-datafusion] alamb closed issue #4420: Incorrect error for plus/minus operations over timestamps and dates

Posted by GitBox <gi...@apache.org>.
alamb closed issue #4420: Incorrect error for plus/minus operations over timestamps and dates 
URL: https://github.com/apache/arrow-datafusion/issues/4420


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