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

ASF GitHub Bot commented on FLINK-10009:
----------------------------------------

XuQianJin-Stars commented on issue #7155: [FLINK-10009] [table] Fix the casting 
problem for function TIMESTAMPADD in Table
URL: https://github.com/apache/flink/pull/7155#issuecomment-441167275
 
 
   hi @sunjincheng121 @wuchong 
   I have just tested calcite, and found that the parsing `timestampadd(MINUTE, 
1, time '20:20:20')` type of calcite is TimeStamp. This problem seems to be a 
bug in calcite. I have submitted isuse to calcite. The following is the link.
   [CALCITE-2699](https://issues.apache.org/jira/browse/CALCITE-2699)
   I find it necessary to open a new isuse for tracking timestampadd's time 
type handling problems.
   What do you think?
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Fix the casting problem for function TIMESTAMPADD in Table
> ----------------------------------------------------------
>
>                 Key: FLINK-10009
>                 URL: https://issues.apache.org/jira/browse/FLINK-10009
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API & SQL
>            Reporter: Xingcan Cui
>            Assignee: Ruidong Li
>            Priority: Major
>              Labels: pull-request-available
>
> There seems to be a bug in {{TIMESTAMPADD}} function. For example, 
> {{TIMESTAMPADD(MINUTE, 1, DATE '2016-06-15')}} throws a 
> {{ClassCastException}} ( java.lang.Integer cannot be cast to java.lang.Long). 
> Actually, it tries to cast an integer date to a long timestamp in 
> RexBuilder.java:1524 - {{return TimestampString.fromMillisSinceEpoch((Long) 
> o)}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to