You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "sunjincheng (JIRA)" <ji...@apache.org> on 2017/06/04 13:19:04 UTC

[jira] [Updated] (FLINK-6811) Add TIMESTAMPADD supported in SQL

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

sunjincheng updated FLINK-6811:
-------------------------------
    Description: 
* Syntax
timestampAdd (datepart , number , date )  
-datepart
Is the part of date to which an integer number is added. 
-number
Is an expression that can be resolved to an int that is added to a datepart of date
-date
Is an expression that can be resolved to a time.

* Example
SELECT timestampAdd(month, 1, '2017-05-31')  from tab; --> 2017-06-30 00:00:00.000

See more: [https://issues.apache.org/jira/browse/CALCITE-1827|https://issues.apache.org/jira/browse/CALCITE-1827]

  was:
* Syntax
testTimestampAdd (datepart , number , date )  
-datepart
Is the part of date to which an integer number is added. 
-number
Is an expression that can be resolved to an int that is added to a datepart of date
-date
Is an expression that can be resolved to a time.

* Example
SELECT testTimestampAdd(month, 1, '2017-05-31')  from tab; --> 2017-06-30 00:00:00.000

See more: [https://issues.apache.org/jira/browse/CALCITE-1827|https://issues.apache.org/jira/browse/CALCITE-1827]


> Add TIMESTAMPADD supported in SQL
> ---------------------------------
>
>                 Key: FLINK-6811
>                 URL: https://issues.apache.org/jira/browse/FLINK-6811
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table API & SQL
>            Reporter: sunjincheng
>            Assignee: sunjincheng
>
> * Syntax
> timestampAdd (datepart , number , date )  
> -datepart
> Is the part of date to which an integer number is added. 
> -number
> Is an expression that can be resolved to an int that is added to a datepart of date
> -date
> Is an expression that can be resolved to a time.
> * Example
> SELECT timestampAdd(month, 1, '2017-05-31')  from tab; --> 2017-06-30 00:00:00.000
> See more: [https://issues.apache.org/jira/browse/CALCITE-1827|https://issues.apache.org/jira/browse/CALCITE-1827]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)