You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Gabor Gevay (JIRA)" <ji...@apache.org> on 2018/02/13 17:31:00 UTC

[jira] [Created] (FLINK-8649) Scala StreamExecutionEnvironment.createInput should pass on the TypeInfo

Gabor Gevay created FLINK-8649:
----------------------------------

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