[ https://issues.apache.org/jira/browse/FLINK-18539?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jark Wu reassigned FLINK-18539: ------------------------------- Assignee: Jark Wu > StreamExecutionEnvironment#addSource(SourceFunction, TypeInformation) doesn't > use the user defined type information > ------------------------------------------------------------------------------------------------------------------- > > Key: FLINK-18539 > URL: https://issues.apache.org/jira/browse/FLINK-18539 > Project: Flink > Issue Type: Task > Components: API / DataStream > Affects Versions: 1.11.0 > Reporter: Jark Wu > Assignee: Jark Wu > Priority: Critical > Fix For: 1.12.0, 1.11.1 > > > {code:java} > class MySource<T> implements SourceFunction<T>, ResultTypeQueryable<T> { > TypeInformation getProducedType() { > return TypeExtractor.createTypeInfo(SourceFunction.class, this.getClass(), > 0, null, null); > } > } > DataStream ds = tEnv.addSource(new MySource(), Types.ROW(Types.STRING)) > {code} > The returned {{TypeInformation}} of {{MySource}} is {{GenericTypeInfo}}, not > the user given {{RowTypeInfo}}. > It seems that {{StreamExecutionEnvironment#getTypeInfo}} doesn't use the user > given {{typeInfo}} in the highest priority. -- This message was sent by Atlassian Jira (v8.3.4#803005)