[ https://issues.apache.org/jira/browse/FLINK-5884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15997621#comment-15997621 ]
ASF GitHub Bot commented on FLINK-5884: --------------------------------------- Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/3808#discussion_r114791208 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/calcite/FlinkTypeFactory.scala --- @@ -77,23 +83,75 @@ class FlinkTypeFactory(typeSystem: RelDataTypeSystem) extends JavaTypeFactoryImp } /** + * Creates a indicator type for processing-time, but with similar properties as SQL timestamp. + */ + def createProctimeIndicatorType(): RelDataType = { + val originalType = createTypeFromTypeInfo(SqlTimeTypeInfo.TIMESTAMP) + canonize( + new TimeIndicatorRelDataType( + getTypeSystem, + originalType.asInstanceOf[BasicSqlType], + isEventTime = false) + ) + } + + /** + * Creates a indicator type for event-time, but with similar properties as SQL timestamp. + */ + def createRowtimeIndicatorType(): RelDataType = { + val originalType = createTypeFromTypeInfo(SqlTimeTypeInfo.TIMESTAMP) + canonize( + new TimeIndicatorRelDataType( + getTypeSystem, + originalType.asInstanceOf[BasicSqlType], + isEventTime = true) + ) + } + + /** * Creates a struct type with the input fieldNames and input fieldTypes using FlinkTypeFactory * * @param fieldNames field names * @param fieldTypes field types, every element is Flink's [[TypeInformation]] - * @return a struct type with the input fieldNames and input fieldTypes + * @param rowtime optional system field to indicate event-time; the index determines the index + * in the final record and might replace an existing field --- End diff -- existing fields are shifted not replaced, correct? > Integrate time indicators for Table API & SQL > --------------------------------------------- > > Key: FLINK-5884 > URL: https://issues.apache.org/jira/browse/FLINK-5884 > Project: Flink > Issue Type: New Feature > Components: Table API & SQL > Reporter: Timo Walther > Assignee: Timo Walther > Priority: Blocker > Fix For: 1.3.0 > > > We already discussed the need for a proper integration of time indicators > (event-time or processing-time) for both the Table API & SQL on the ML: > http://apache-flink-mailing-list-archive.1008284.n3.nabble.com/DISCUSS-Table-API-SQL-indicators-for-event-and-processing-time-tp15927.html > This issue will track the progress. I will work on a design document how we > can solve this issue. -- This message was sent by Atlassian JIRA (v6.3.15#6346)