Inconsistent type inference for date add/subtract interval operations #574
LeonidChistov
started this conversation in
General
Replies: 2 comments 2 replies
-
I don't believe there is a reason. The add functions taking a date should return a date (the same type as the input). |
Beta Was this translation helpful? Give feedback.
1 reply
-
Your analysis makes sense, it should be timestamp. I did find an old PR (#337) that corrected subtract's type, presumably they missed add at that time. We could go with an issue or straight into a PR. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Following operations are defined in Substrait prototypes:
add(date, interval_year): -> timestamp
add(date, interval_day): -> timestamp
subtract(date, interval_year): -> date
subtract(date, interval_day): -> date
Is there a reason why
add
andsubtract
should behave differently wrt to result type?Beta Was this translation helpful? Give feedback.
All reactions