You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
DDtKey
changed the title
Incorrect error for timestampt and date plus/minus operations
Incorrect error for plus/minus operations over timestamps and dates
Nov 29, 2022
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
The text was updated successfully, but these errors were encountered: