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

Zhen Chen commented on CALCITE-7021:
------------------------------------

[~nobigo] 

parser.jj:6285
{code:java}
<INTERVAL> e = IntervalQualifier() { args.add(e); }{code}
change to this
{code:java}
<INTERVAL> [e = IntervalQualifier() { args.add(e); }] {code}
Then it can pass parser.jj, but it will be meet a failure in type deriving. Is 
this what you want, or is completing the modification of type inference what 
you want?

> Support parse 'CAST('1' AS INTERVAL)' 
> --------------------------------------
>
>                 Key: CALCITE-7021
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7021
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: xiong duan
>            Priority: Major
>
> Now we have supported :
> {code:java}
> CAST(VALUE as INTERVAL YEAR)、CAST(VALUE as INTERVAL MONTH)、CAST(VALUE as 
> INTERVAL DAY)、
> CAST(VALUE as INTERVAL HOUR)、CAST(VALUE as INTERVAL MINUTES)、CAST(VALUE as 
> INTERVAL SECOND)
> {code}
> In postgreSQL:
> {code:java}
> CAST(VALUE as INTERVAL) ==> CAST(VALUE as INTERVAL SECOND)
> select cast('1' as  interval);
> select cast('1' as  interval second);
> ==>00:00:01
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to