[
https://issues.apache.org/jira/browse/FLINK-5358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15761003#comment-15761003
]
Fabian Hueske commented on FLINK-5358:
--
Hi [~tonycox],
I think we need to make the JIRA title a bit more concrete.
Extracting the correct {{RowTypeInfo}} using the {{TypeExtractor}} does only
work if there is a concrete {{Row}} instance. It does not work to extract the
type from a function signature such as {{FlatMap}}.
In order to extract the {{TypeInformation}} for a concrete {{Row}} instance,
the type extractor would need to extract the type of all objects hold in the
{{fields}} array and instantiate a {{RowTypeInformation}} with these types. If
all {{Row}} s in a collection have the same types for all fields, the approach
to extract the type from the first object should be OK. The same assumption is
done for every other type.
> Support Row in TypeExtractor
>
>
> Key: FLINK-5358
> URL: https://issues.apache.org/jira/browse/FLINK-5358
> Project: Flink
> Issue Type: Improvement
>Reporter: Anton Solovev
>Assignee: Anton Solovev
>
> {code}
> Row[] data = new Row[]{};
> TypeInformation typeInfo = TypeExtractor.getForObject(data[0]);
> {code}
> method {{getForObject}} wraps it into
> {code}
> GenericTypeInfo
> {code}
> the method should return {{RowTypeInfo}}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)