Drew Schmitt created CALCITE-3987: ------------------------------------- Summary: 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
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)