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

Yiyu Tian edited comment on FLINK-36941 at 12/20/24 7:29 AM:
-------------------------------------------------------------

Verifying in the code that, _DATE_FORMAT(timestamp, string)_ eventually calls 
_formatTimestamp(TimestampData ts, String format, ZoneId zoneId)_ in 
{_}DateTimeUtils.java{_}, which uses [DateTimeFormatter|#L724]]. 
 
 _DATE_FORMAT(string, string)_ eventually calls 
_formatTimestampStringWithOffset(_
_String dateStr, String fromFormat, String toFormat, TimeZone tz, long 
offsetMills)_ in {_}DateTimeUtils.java{_}, which uses
[SimpleDateFormat|https://github.com/apache/flink/blob/1523f2c2062b860a2abfe75f8ead276bb161d64a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/utils/DateTimeUtils.java#L743].
 


was (Author: JIRAUSER307116):
Verifying in the code that, 
??DATE_FORMAT(timestamp, string)?? eventually calls 
??formatTimestamp(TimestampData ts, String format, ZoneId zoneId)?? in 
??DateTimeUtils.java??, which uses [DateTimeFormatter|#L724]]. 
 
 
??DATE_FORMAT(string, string)?? eventually calls 
??formatTimestampStringWithOffset(??
??String dateStr, String fromFormat, String toFormat, TimeZone tz, long 
offsetMills)?? in ??DateTimeUtils.java??, which uses
[SimpleDateFormat|https://github.com/apache/flink/blob/1523f2c2062b860a2abfe75f8ead276bb161d64a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/utils/DateTimeUtils.java#L743].
 

> Fix Doc for DATE_FORMAT
> -----------------------
>
>                 Key: FLINK-36941
>                 URL: https://issues.apache.org/jira/browse/FLINK-36941
>             Project: Flink
>          Issue Type: Bug
>          Components: Documentation
>            Reporter: Yiyu Tian
>            Priority: Major
>
> The documentation for DATE_FORMAT is outdated. 
> https://github.com/apache/flink/blob/6951686be5691dc855b6d07d575535ac239670da/docs/data/sql_functions.yml#L645



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to