You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Moses (Jira)" <ji...@apache.org> on 2022/04/01 10:27:00 UTC

[jira] [Comment Edited] (FLINK-26943) Add DATE_ADD supported in SQL & Table API

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

Moses edited comment on FLINK-26943 at 4/1/22 10:26 AM:
--------------------------------------------------------

[~sunjincheng121]   I wann take this issue, could you please assgin to me ?


was (Author: zhangchaoming):
[~jark]  I wann take this issue, could you please assgin to me ?

> Add DATE_ADD supported in SQL & Table API
> -----------------------------------------
>
>                 Key: FLINK-26943
>                 URL: https://issues.apache.org/jira/browse/FLINK-26943
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table SQL / API
>            Reporter: dalongliu
>            Priority: Critical
>             Fix For: 1.16.0
>
>
> Returns the date {{numDays}} after {{{}startDate{}}}.
> Syntax:
> {code:java}
> date_add(startDate, numDays) {code}
> Arguments:
>  * {{{}startDate{}}}: A DATE expression.
>  * {{{}numDays{}}}: An INTEGER expression.
> Returns:
> A DATE.
> If {{numDays}} is negative {{abs(num_days)}} are subtracted from {{{}startDate{}}}.
> If the result date overflows the date range the function raises an error.
> Examples:
>  
> {code:java}
> > SELECT date_add('2016-07-30', 1); 
> 2016-07-31  {code}
>  
> See more:
>  * [Hive|https://cwiki.apache.org/confluence/display/hive/languagemanual+udf]
>  * [Spark|https://spark.apache.org/docs/latest/sql-ref-functions-builtin.html#date-and-timestamp-functions]



--
This message was sent by Atlassian Jira
(v8.20.1#820001)