clownxc opened a new pull request, #22353:
URL: https://github.com/apache/flink/pull/22353
## What is the purpose of the change
The current DATE_FORMAT function only supports TIMESTAMPs. Ideally, it
should be able to format DATE's as well as TIMESTAMPs.
Like Spark DATE_FORMAT
```
Converts a date/timestamp/string to a value of string in the format
specified by the date format given by the second argument.
```
## Brief change log
- Modify DATE_FORMAT system (built-in) function to accepts DATEs
```sql
SELECT DATE_FORMAT(CURRENT_DATE, 'yyyy/MM/dd HH:mm:ss')
```
## Verifying this change
This change added tests in TemporalTypesTest#testDateFormat
## 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):
(yes )
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)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]