Jark Wu created FLINK-18539:
-------------------------------

             Summary: 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
    Affects Versions: 1.11.0
            Reporter: Jark Wu
             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)

Reply via email to