[
https://issues.apache.org/jira/browse/FLINK-7337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16111030#comment-16111030
]
Fabian Hueske commented on FLINK-7337:
--------------------------------------
We would of course still have a logical and a physical schema. The logical
schema is Calcite's {{RelDataType}} and the physical schema is based on Flink's
{{TypeInformation}}.
However, both would be have the same schema and we do not need a special
translation that "filters" out time indicator fields and keeps track of their
positions. Hence, we might be able to remove the {{RowSchema}} class (or keep
it but significantly simplify the logic).
Time indicator fields would be defined and identified as before. So we would
still use {{.rowtime}} and {{.proctime}} when converting a {{DataStream}} into
a {{Table}} and the equivalent interfaces for {{TableSources}}. Fields which
are declared as {{rowtime}} (or {{proctime}}) will have a special time
indicator type (as right now). Any expressions that is evaluated on such a
field results in a regular timestamp type, i.e., the resulting value cannot be
used as a time indicator. AFAIK, the current approach uses similar checks.
So essentially, many things (including the API) remain as they are. We are
"only" changing the internal representation of timestamp attributes.
> Refactor handling of time indicator attributes
> ----------------------------------------------
>
> Key: FLINK-7337
> URL: https://issues.apache.org/jira/browse/FLINK-7337
> Project: Flink
> Issue Type: Improvement
> Components: Table API & SQL
> Affects Versions: 1.4.0
> Reporter: Fabian Hueske
> Assignee: Fabian Hueske
>
> After a [discussion on the dev mailing
> list|https://lists.apache.org/thread.html/735d55f9022df8ff73566a9f1553e14be94f8443986ad46559b35869@%3Cdev.flink.apache.org%3E]
> I propose the following changes to the current handling of time indicator
> attributes:
> * Remove the separation of logical and physical row type.
> ** Hold the event-time timestamp as regular Long field in Row
> ** Represent the processing-time indicator type as a null-valued field in Row
> (1 bit overhead)
> * Remove materialization of event-time timestamps because timestamp is
> already accessible in Row.
> * Add {{ProcessFunction}} to set timestamp into the timestamp field of a
> {{StreamRecord}}.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)