[
https://issues.apache.org/jira/browse/FLINK-6980?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sihua Zhou closed FLINK-6980.
-----------------------------
Resolution: Won't Fix
> TypeExtractor.getForObject can't get typeinfo correctly.
> --------------------------------------------------------
>
> Key: FLINK-6980
> URL: https://issues.apache.org/jira/browse/FLINK-6980
> Project: Flink
> Issue Type: Bug
> Components: DataStream API
> Affects Versions: 1.3.0
> Reporter: Sihua Zhou
> Priority: Minor
>
> Here is my class define:
> _class MyRecord extends Row implements Retracting, Value {}_
> When i use it like below, it just throw type cast error:
> java.lang.ClassCastException: org.apache.flink.types.Row cannot be cast to
> org.apache.flink.types.Value
> MyRecord[] recordList = new MyRecord[6];
> DataStream<MyRecord> dataStream = env.fromElements(recordList);
> //MyFilter 's input arg type is MyRecord.
> dataStream.flatMap(new MyFilter()).returns(MyRecord.class).print();
> I found this is becuase of the TypeExtractor.getForObject called in
> env.fromElements() can't get the
> element's type corrently and TypeExtractor.getForObject work corrently in
> flink 1.2.0.
> I know this problem can be solved by use env.fromElement(MyRecord.class,
> recordList) instead, i just want to know whether this is a bug or not? Why it
> can be work correctly in 1.2.0 and can't in 1.3.0?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)