You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Martijn Visser (Jira)" <ji...@apache.org> on 2022/05/17 06:45:00 UTC
[jira] [Updated] (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:all-tabpanel ]
Martijn Visser updated FLINK-26943:
-----------------------------------
Fix Version/s: (was: 1.16.0)
> 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: Major
> Labels: pull-request-available
>
> 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.7#820007)