[ 
https://issues.apache.org/jira/browse/CALCITE-1512?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julian Hyde resolved CALCITE-1512.
----------------------------------
    Resolution: Not A Problem

I'm guessing that you are creating a call to {{SqlStdOperatorTable.MINUS}} 
programmatically. Because if you had written {{ts - ts}} in SQL, the validator 
would have rejected the query, telling you to use {{(ts - ts) timeUnit [ to 
timeUnit ]}} instead.

Programmatically, you should use {{SqlStdOperatorTable.MINUS_DATE}} for 
date-time values; the function takes 3 arguments, the last of which is the 
desired interval type.

> Return type of timestamp - timestamp should be interval
> -------------------------------------------------------
>
>                 Key: CALCITE-1512
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1512
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.10.0
>            Reporter: Ashutosh Chauhan
>            Assignee: Julian Hyde
>
> Currently return type of expression ts - ts is inferred as timestamp



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to