[
https://issues.apache.org/jira/browse/FLINK-8518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16488712#comment-16488712
]
ASF GitHub Bot commented on FLINK-8518:
---------------------------------------
Github user snuyanzin commented on the issue:
https://github.com/apache/flink/pull/6007
@twalthr thank you for your comment but could you please clarify this
> Can you add some documentation to sqlApi.md such that users know about
the semantics?
1. Am I right that you mean `docs/dev/table/sql.md`?
2. Currently I see the general explanation of extract and reserved words
where DOW already specified.
From this point of view I do not see what could be updated right now. At
the same time I have a proposal to go to the similar way as Calcite does.
[Here](https://calcite.apache.org/docs/reference.html) there is a link to their
functions including date/time. Among extract they also have synonyms e.g.
>MONTH(date) | Equivalent to EXTRACT(MONTH FROM date). Returns an integer
between 1 and 12.
>WEEK(date) | Equivalent to EXTRACT(WEEK FROM date). Returns an integer
between 1 and 53.
>DAYOFYEAR(date) | Equivalent to EXTRACT(DOY FROM date). Returns an integer
between 1 and 366.
and etc.
So I suggest to introduce the same synonyms in flink (just via usage of
existing in Calcite) and organize documentation for them in a similar way
> Support DOW, EPOCH, DECADE for EXTRACT
> --------------------------------------
>
> Key: FLINK-8518
> URL: https://issues.apache.org/jira/browse/FLINK-8518
> Project: Flink
> Issue Type: Improvement
> Components: Table API & SQL
> Reporter: Timo Walther
> Assignee: Sergey Nuyanzin
> Priority: Major
>
> We upgraded Calcite to version 1.15 in FLINK-7934. The EXTRACT method
> supports more conversion targets. The targets DOW, EPOCH, DECADE should be
> implemented and tested for different datatypes.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)