[
https://issues.apache.org/jira/browse/FLINK-6693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16060702#comment-16060702
]
ASF GitHub Bot commented on FLINK-6693:
---------------------------------------
Github user twalthr commented on a diff in the pull request:
https://github.com/apache/flink/pull/4078#discussion_r123718414
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/expressions/time.scala
---
@@ -375,3 +377,13 @@ case class TemporalOverlaps(
}
}
+case class DateFormat(timestamp: Expression, format: Expression) extends
Expression {
+ override private[flink] def children = timestamp :: format :: Nil
+
+ override private[flink] def toRexNode(implicit relBuilder: RelBuilder) =
+ relBuilder.call(DateTimeSqlFunction.DATE_FORMAT, timestamp.toRexNode,
format.toRexNode)
+
+ override def toString: String = s"$timestamp.dateformat($format)"
--- End diff --
`dateFormat`
> Support DATE_FORMAT function in the Table / SQL API
> ---------------------------------------------------
>
> Key: FLINK-6693
> URL: https://issues.apache.org/jira/browse/FLINK-6693
> Project: Flink
> Issue Type: New Feature
> Components: Table API & SQL
> Reporter: Haohui Mai
> Assignee: Haohui Mai
>
> It would be quite handy to support the {{DATE_FORMAT}} function in Flink to
> support various date / time related operations:
> The specification of the {{DATE_FORMAT}} function can be found in
> https://prestodb.io/docs/current/functions/datetime.html.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)