[
https://issues.apache.org/jira/browse/CALCITE-3987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17105673#comment-17105673
]
Julian Hyde commented on CALCITE-3987:
--------------------------------------
An example of a conformance change is CALCITE-2672. An example of a function
library change is CALCITE-2460. An example of a type system change is
CALCITE-1945.
I can't tell which of these would be the best model to follow.
> Allow addition and subtraction operations between DATE and NUMERIC types.
> -------------------------------------------------------------------------
>
> Key: CALCITE-3987
> URL: https://issues.apache.org/jira/browse/CALCITE-3987
> Project: Calcite
> Issue Type: Improvement
> Reporter: Drew Schmitt
> Priority: Minor
>
> We should allow addition (PLUS operator) and subtraction (MINUS operator)
> between DATE and NUMERIC types to be valid during the validation phase.
> Downstream, the result of the operation can be interpreted differently
> depending on the dialect. For example, some dialects would interpret any
> arithmetic with a DATE as implying adding/subtracting a number of days.
> Example query:
> CREATE TABLE foo (bar DATE);
> SELECT bar - 1 FROM foo;
--
This message was sent by Atlassian Jira
(v8.3.4#803005)