[
https://issues.apache.org/jira/browse/FLINK-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16533579#comment-16533579
]
ASF GitHub Bot commented on FLINK-8094:
---------------------------------------
Github user fhueske commented on the issue:
https://github.com/apache/flink/pull/6253
It's a good question whether to add a new class or not. Right now,
extending the implementation of `ExistingField` seems like a better approach to
me. Once we add a `ParsingExistingField` extractor that can be configured with
a timestamp format, the ISO date String support in `ExistingField` would be
obsolete, but IMO that's not a big problem.
+1 to change the implementation to extend `ExistingField`.
Regarding the tests, I think `ExistingField` is used in a few ITCases, but
there are no unit tests yet.
Adding unit tests is a bit tricky, because we would need to integrate it
with the code generator, etc.
So, a big +1 if you would like to look into that, but I'd also be fine by
adding another ITCase.
For the documentation, we might want to extend the bullet point about
`timestampExtractor` in the [Defining a Rowtime
Attribute](https://ci.apache.org/projects/flink/flink-docs-release-1.5/dev/table/sourceSinks.html#defining-a-rowtime-attribute)
section.
Thanks, Fabian
> Support other types for ExistingField rowtime extractor
> -------------------------------------------------------
>
> Key: FLINK-8094
> URL: https://issues.apache.org/jira/browse/FLINK-8094
> Project: Flink
> Issue Type: Improvement
> Components: Table API & SQL
> Affects Versions: 1.4.0, 1.5.0
> Reporter: Xingcan Cui
> Priority: Major
> Labels: pull-request-available
>
> Currently, the {{ExistingField}} rowtime extractor only supports {{Long}} and
> {{Timestamp}} fields. To enable other data types (e.g., {{String}}), we can
> provide some system extraction functions and allow users to pass some
> parameters via the constructor of {{ExistingField}}. There's [a simple
> demo|https://github.com/xccui/flink/commit/afcc5f1a0ad92db08294199e61be5df72c1514f8]
> which enables the {{String}} type rowtime by adding a UDF {{str2EventTime}}.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)