You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "xueyu (JIRA)" <ji...@apache.org> on 2018/11/19 11:39:00 UTC

[jira] [Commented] (FLINK-10926) Fix the problem for function TIMESTAMPDIFF in Table

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

xueyu commented on FLINK-10926:
-------------------------------

hi, [~x1q1j1], you could try this: 
{{select TIMESTAMPDIFF (MINUTE, TIMESTAMP '2012-08-24 09:00:00', TIMESTAMP '2012-08-30 12:00:00')}}

It needs to explicitly add TIMESTAMP to express timestamp data type,
Thanks~


> Fix the problem for function TIMESTAMPDIFF in Table
> ---------------------------------------------------
>
>                 Key: FLINK-10926
>                 URL: https://issues.apache.org/jira/browse/FLINK-10926
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API &amp; SQL
>            Reporter: xuqianjin
>            Priority: Minor
>         Attachments: image-2018-11-19-18-33-47-389.png
>
>
> Use the following SQL statement:
> val result3 = tEnv.sqlQuery("select TIMESTAMPDIFF(MINUTE,'2012-08-24 09:00:00','2012-08-30 12:00:00')")
> The following errors occurred:
> Caused by: org.apache.calcite.runtime.CalciteContextException: From line 1, column 8 to line 1, column 72: No match found for function signature TIMESTAMPDIFF(<null>, <CHARACTER>, <CHARACTER>)
>  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> Expect to be able to return the time difference correctly



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