[ 
https://issues.apache.org/jira/browse/IGNITE-14961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17541434#comment-17541434
 ] 

Taras Ledkov commented on IGNITE-14961:
---------------------------------------

[~vladsz83], according with  SQL2003: 4.6.4 (Table 7) DATE + NUMERIC is not 
standard behavior.
But the most popular DB engines support this syntax.

> Calcite engine. Arithmetic operators cannot be applied to <DATE> + <INTEGER>
> ----------------------------------------------------------------------------
>
>                 Key: IGNITE-14961
>                 URL: https://issues.apache.org/jira/browse/IGNITE-14961
>             Project: Ignite
>          Issue Type: Improvement
>          Components: sql
>            Reporter: Taras Ledkov
>            Priority: Minor
>              Labels: uncertain
>
> The query
> {{SELECT CAST('2000-10-10' AS DATE) + 2}}
> fails with *SqlValidatorException*
> {code}
> Cannot apply '+' to arguments of type '<DATE> + <INTEGER>'. Supported 
> form(s): '<NUMERIC> + <NUMERIC>'
> '<DATETIME_INTERVAL> + <DATETIME_INTERVAL>'
> '<DATETIME> + <DATETIME_INTERVAL>'
> '<DATETIME_INTERVAL> + <DATETIME>'
> {code}
> Tests:
> {{function/date/test_extract_edge_cases.test_ignore}}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to