[ https://issues.apache.org/jira/browse/FLINK-1799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14487977#comment-14487977 ]
ASF GitHub Bot commented on FLINK-1799: --------------------------------------- Github user StephanEwen commented on the pull request: https://github.com/apache/flink/pull/582#issuecomment-91327192 Instead of the switch/case statement, can't you use `PrimitiveArrayTypeInfo.getInfoFor(Class<X> type)`? Seems simpler. Also, this is a good change to be backed by a Unit test case, rather than an Integration test case. I really think that such changes should be guarded by more fine grained tests (Unit Tests(, rather than the "big hammer" kind of test (have a distributed program that uses this). Out testing time goes through the roof otherwise. I fund that unit tests are a cycle or two more work to write, but typically also get you thinking better about what cases the tests should cover. > Scala API does not support generic arrays > ----------------------------------------- > > Key: FLINK-1799 > URL: https://issues.apache.org/jira/browse/FLINK-1799 > Project: Flink > Issue Type: Bug > Reporter: Till Rohrmann > Assignee: Aljoscha Krettek > > The Scala API does not support generic arrays at the moment. It throws a > rather unhelpful error message ```InvalidTypesException: The given type is > not a valid object array```. > Code to reproduce the problem is given below: > {code} > def main(args: Array[String]) { > foobar[Double] > } > def foobar[T: ClassTag: TypeInformation]: DataSet[Block[T]] = { > val tpe = createTypeInformation[Array[T]] > null > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)