-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLINK-26943][table] Add the built-in function DATE_ADD #24988
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit
|
||
`startDate <DATE | TIMESTAMP_WITHOUT_TIME_ZONE | TIMESTAMP_WITH_LOCAL_TIME_ZONE | CHAR | VARCHAR>, numDays <TINYINT | SMALLINT | INTEGER | BIGINT>` | ||
|
||
Returns a `DATE`, `NULL` if any of the arguments are `NULL` or result overflows or date string invalid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returns a `DATE`, `NULL` if any of the arguments are `NULL` or result overflows or date string invalid. | |
Returns a `DATE`, `NULL` if any of the arguments is `NULL` or result overflows or date string is invalid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems both of them are acceptable.
Adds num_days days to start_date. | ||
If num_days is negative, -num_days are subtracted from start_date. | ||
|
||
null if any of the arguments are null or result overflows or date string invalid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null if any of the arguments are null or result overflows or date string invalid. | |
null if any of the arguments is null or result overflows or date string is invalid. |
/** | ||
* Adds {@code numDays} days to {@code startDate}.<br> | ||
* If {@code numDays} is negative, {@code -numDays} are subtracted from {@code startDate}.<br> | ||
* null if any of the arguments are null or result overflows or date string invalid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* null if any of the arguments are null or result overflows or date string invalid. | |
* null if any of the arguments is null or result overflows or date string is invalid. |
What is the purpose of the change
Add DATE_ADD supported in SQL & Table API.
Examples:
Brief change log
FLINK-26943
Verifying this change
This change added tests and can be verified as follows:
TimeFunctionsITCase#dateAddTestCases
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: yesDocumentation