Hi, Below is sample code I am trying with, StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
public class EmployeeSourceFunction implements SourceFunction<Row> { And I am getting below exception java.lang.ClassCastException: org.apache.flink.api.java.typeutils.RowTypeInfo cannot be cast to org.apache.flink.api.java.typeutils.TupleTypeInfo at org.apache.flink.streaming.util.typeutils.FieldAccessorFactory.getAccessor(FieldAccessorFactory.java:167) I have checked FieldAccessorFactory.java:167, if (typeInfo.isTupleType()) { RowTypeInfo returns 'true' for isTupleType() and cannot be casted. Can someone please tell me, Is it that I have done wrong configuration or bug in code ? Thank you, Madan. |
Hi Madan,
this is definitely a bug. The Row type has mostly been added for the Table & SQL API and has not tested for expression keys. But in general I would use a tuple in your case as they are more efficient. The `registerType` is only necessary for generic types serialized with Kryo. I opened https://issues.apache.org/jira/browse/FLINK-8255. If you would like to fix it, I can assign it to you. Thanks. Regards, Timo Am 12/13/17 um 4:16 PM schrieb madan:
|
Free forum by Nabble | Edit this page |