You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/05/10 11:51:01 UTC
[jira] [Commented] (FLINK-8649) Scala
StreamExecutionEnvironment.createInput should pass on the TypeInfo
[ https://issues.apache.org/jira/browse/FLINK-8649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16470264#comment-16470264 ]
ASF GitHub Bot commented on FLINK-8649:
---------------------------------------
Github user asfgit closed the pull request at:
https://github.com/apache/flink/pull/5479
> 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)