flink
flink copied to clipboard
[FLINK-26944][Table SQL/API] Add ADD_MONTHS supported in SQL and Table API
What is the purpose of the change
Add add_months(startDate, numMonths) SQL function. Examples:
> SELECT add_months('2016-08-31', 1);
2016-09-30
> SELECT add_months('2016-08-31', -6);
2016-02-29
Brief change log
- Add addMonths method to DateTimeUtils.java
- Add related expression, convert rule, and code gen.
Verifying this change
This change is already covered by existing tests, such as TemporalTypesTest#testAddMonths.
Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (no)
- The public API, i.e., is any changed class annotated with
@Public(Evolving)
: (no) - The serializers: (no)
- The runtime per-record code paths (performance sensitive): (no)
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
- The S3 file system connector: (no)
Documentation
- Does this pull request introduce a new feature? (yes)
- If yes, how is the feature documented? (docs )
CI report:
- bed854175ec29e5b9144d1ace66738a53e6d294e UNKNOWN
- 693ca6c00d8c2d2d5f7efb6293df1e4905875828 Azure: SUCCESS
Bot commands
The @flinkbot bot supports the following commands:-
@flinkbot run azure
re-run the last Azure build