You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jinfeng Ni (JIRA)" <ji...@apache.org> on 2015/10/21 22:19:27 UTC

[jira] [Commented] (CALCITE-928) Parsing Issue with Interval

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

Jinfeng Ni commented on CALCITE-928:
------------------------------------

In the second case, should the example be like the following?

{code}
INTERVAL  '-1' hour
{code}

> Parsing Issue with Interval
> ---------------------------
>
>                 Key: CALCITE-928
>                 URL: https://issues.apache.org/jira/browse/CALCITE-928
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Sean Hsuan-Yi Chu
>            Assignee: Sean Hsuan-Yi Chu
>
> There are two issues with Interval type
> 1. A case which should be blocked at parsing:
> The negative sign is not supposed to be outside of quotes. For example, 
> {code}
> INTERVAL -'1' hour
> {code}
> Calcite should have blocked it.
> 2. The sign is not set correctly in parsing if there is a negative sign in quotes. For example, 
> {code}
> INTERVAL -'1' hour
> {code}
> If you set a break point at the constructor of IntervalValue (, which will be called during parsing), you can see that, in the case above, sign is set to be +1.  
>  



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