[ 
https://issues.apache.org/jira/browse/FLINK-1906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14502870#comment-14502870
 ] 

ASF GitHub Bot commented on FLINK-1906:
---------------------------------------

Github user StephanEwen commented on the pull request:

    https://github.com/apache/flink/pull/611#issuecomment-94457892
  
    Good addition, +1 to merge


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

Reply via email to