[ 
https://issues.apache.org/jira/browse/FLINK-8649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16363644#comment-16363644
 ] 

ASF GitHub Bot commented on FLINK-8649:
---------------------------------------

Github user twalthr commented on the issue:

    https://github.com/apache/flink/pull/5479
  
    Thank you @ggevay. I will look at this soon.


> Scala StreamExecutionEnvironment.createInput should pass on the TypeInfo
> ------------------------------------------------------------------------
>
>                 Key: FLINK-8649
>                 URL: https://issues.apache.org/jira/browse/FLINK-8649
>             Project: Flink
>          Issue Type: Bug
>          Components: Scala API
>    Affects Versions: 1.4.0
>            Reporter: Gabor Gevay
>            Assignee: Gabor Gevay
>            Priority: Trivial
>             Fix For: 1.5.0
>
>
> This is {{StreamExecutionEnvironment.createInput}} in the Scala API:
> {code}
> def createInput[T: TypeInformation](inputFormat: InputFormat[T, _]): 
> DataStream[T] =
>   asScalaStream(javaEnv.createInput(inputFormat))
> {code}
> It should pass on the implicitly got {{TypeInformation}} to Java like this:
> {code}
> def createInput[T: TypeInformation](inputFormat: InputFormat[T, _]): 
> DataStream[T] =
>   asScalaStream(javaEnv.createInput(inputFormat, 
> implicitly[TypeInformation[T]]))
> {code}
> The current situation creates a problem, for example, when we have generics 
> in the type like in the following code, where the Java API can't deduce the 
> {{TypeInformation}} on its own:
> {code}
>  
> StreamExecutionEnvironment.getExecutionEnvironment.createInput[Tuple2[Integer,
>  Integer]](new ParallelIteratorInputFormat[Tuple2[Integer, Integer]](null))
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to