[
https://issues.apache.org/jira/browse/FLINK-1464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14299321#comment-14299321
]
ASF GitHub Bot commented on FLINK-1464:
---------------------------------------
Github user aalexandrov commented on the pull request:
https://github.com/apache/flink/pull/349#issuecomment-72284550
@hsaputra: I just did:
[FLINK-1464](https://issues.apache.org/jira/browse/FLINK-1464).
> Added ResultTypeQueryable interface to TypeSerializerInputFormat.
> -----------------------------------------------------------------
>
> Key: FLINK-1464
> URL: https://issues.apache.org/jira/browse/FLINK-1464
> Project: Flink
> Issue Type: Improvement
> Components: Distributed Runtime, Optimizer
> Affects Versions: 0.8, 0.9, 0.8.1
> Reporter: Alexander Alexandrov
> Assignee: Alexander Alexandrov
> Priority: Minor
> Labels: easyfix
> Fix For: 0.9, 0.8.1
>
> Original Estimate: 6h
> Remaining Estimate: 6h
>
> It is currently impossible to use the {{TypeSerializerInputFormat}} with
> generic Tuple types.
> For example, [this example
> gist|https://gist.github.com/aalexandrov/90bf21f66bf604676f37] fails with a
> {quote}
> Exception in thread "main"
> org.apache.flink.api.common.InvalidProgramException: The type returned by the
> input format could not be automatically determined. Please specify the
> TypeInformation of the produced type explicitly.
> at
> org.apache.flink.api.java.ExecutionEnvironment.readFile(ExecutionEnvironment.java:341)
> at SerializedFormatExample$.main(SerializedFormatExample.scala:48)
> at SerializedFormatExample.main(SerializedFormatExample.scala)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
> {quote}
> exaception.
> To fix the issue, I changed the constructor to take a {{TypeInformation<T>}}
> instad of a {{TypeSerializer<T>}} argument. If this is indeed a bug, I think
> that this is a good solution.
> Unfortunately the fix breaks the API. Feel free to change it if you find a
> more elegant solution compatible with the 0.8 branch.
> The suggested fix can be found in the GitHub
> [PR#349|https://github.com/apache/flink/pull/349].
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)