[ https://issues.apache.org/jira/browse/FLINK-1906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14501513#comment-14501513 ]
ASF GitHub Bot commented on FLINK-1906: --------------------------------------- GitHub user chiwanpark opened a pull request: https://github.com/apache/flink/pull/611 [FLINK-1906] [docs] Add tip to work around plain Tuple return type of project operator Add a tip about project transformation with type hinting in documentation. Related JIRA is [here](https://issues.apache.org/jira/browse/FLINK-1906). You can merge this pull request into a Git repository by running: $ git pull https://github.com/chiwanpark/flink FLINK-1906 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/611.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #611 ---- commit fd784be28c8f6bd85019e653a131975c36e7f2d0 Author: Chiwan Park <chiwanp...@icloud.com> Date: 2015-04-18T18:24:16Z [FLINK-1906] [docs] Add tip to work around plain Tuple return type of project operator ---- > Add tip to work around plain Tuple return type of project operator > ------------------------------------------------------------------ > > Key: FLINK-1906 > URL: https://issues.apache.org/jira/browse/FLINK-1906 > Project: Flink > Issue Type: Improvement > Components: Documentation > Affects Versions: 0.9 > Reporter: Fabian Hueske > Assignee: Chiwan Park > Priority: Minor > Labels: starter > > The Java compiler is not able to infer the return type of the {{project}} > operator and defaults to {{Tuple}}. This can cause problems if another > operator is immediately called on the result of a {{project}} operator such > as: > {code} > DataSet<Tuple5<String,String,String,String,String>> ds = .... > DataSet<Tuple1<String>> ds2 = ds.project(0).distinct(0); > {code} > This problem can be overcome by hinting the return type of {{project}} like > this: > {code} > DataSet<Tuple1<String>> ds2 = ds.<Tuple1<String>project(0).distinct(0); > {code} > We should add this description to the documentation of the project operator. -- This message was sent by Atlassian JIRA (v6.3.4#6332)