[
https://issues.apache.org/jira/browse/FLINK-6483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16004573#comment-16004573
]
ASF GitHub Bot commented on FLINK-6483:
---------------------------------------
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/3862#discussion_r115705183
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/CodeGenerator.scala
---
@@ -1840,6 +1859,35 @@ class CodeGenerator(
}
}
+ private[flink] def generateRecordTimestamp(isEventTime: Boolean):
GeneratedExpression = {
+ val resultTerm = newName("result")
+ val nullTerm = newName("isNull")
+ val resultTypeTerm =
primitiveTypeTermForTypeInfo(SqlTimeTypeInfo.TIMESTAMP)
+ val defaultValue = primitiveDefaultValue(SqlTimeTypeInfo.TIMESTAMP)
+
+ if (isEventTime) {
+ val resultCode =
+ s"""
+ |boolean $nullTerm = $contextTerm.timestamp() == null;
--- End diff --
Maybe it makes even sense to to this check once in the beginning of a query
to avoid the repeated checks whenever we materialize the time. I'd consider
this as a future improvement.
> Support time materialization
> ----------------------------
>
> Key: FLINK-6483
> URL: https://issues.apache.org/jira/browse/FLINK-6483
> Project: Flink
> Issue Type: New Feature
> Components: Table API & SQL
> Reporter: Timo Walther
> Assignee: Timo Walther
>
> FLINK-5884 added support for time indicators. However, there are still some
> features missing i.e. materialization of metadata timestamp.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)