[jira] [Commented] (FLINK-5358) Support Row in TypeExtractor

2016-12-19 Thread Fabian Hueske (JIRA)

[ 
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)


[jira] [Commented] (FLINK-5358) Support Row in TypeExtractor

2016-12-19 Thread Anton Solovev (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-5358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15760719#comment-15760719
 ] 

Anton Solovev commented on FLINK-5358:
--

Any ExecutionEnvironment exctracts type from TypeExtractor first elemnt in 
collection in such methods {{#fromCollection(Collection data)}}, 
{{fromElements(X... data)}}
I think we need rework them either
[~fhueske], [~jark] what do you think?

> 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)