[ https://issues.apache.org/jira/browse/FLINK-18539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17156450#comment-17156450 ]
Jark Wu edited comment on FLINK-18539 at 7/14/20, 1:58 AM: ----------------------------------------------------------- - master (1.12.0): 68d83ef7bd43fbd20f51551d7216364b41ace793 - 1.11.1: 38495e7378f6df5eead9a29448e3944f2b3ecbea - 1.10.2: 2a3b642b1efb957f3d4f20502c40398786ab1469 was (Author: jark): - master (1.12.0): 68d83ef7bd43fbd20f51551d7216364b41ace793 - 1.11.1: 38495e7378f6df5eead9a29448e3944f2b3ecbea - 1.10.2: TODO > 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 > Labels: pull-request-available > Fix For: 1.10.2, 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)