You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jark Wu (Jira)" <ji...@apache.org> on 2020/07/14 01:59:00 UTC

[jira] [Closed] (FLINK-18539) StreamExecutionEnvironment#addSource(SourceFunction, TypeInformation) doesn't use the user defined type information

     [ https://issues.apache.org/jira/browse/FLINK-18539?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jark Wu closed FLINK-18539.
---------------------------
    Resolution: Fixed

> 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)