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

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

Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/incubator-flink/pull/194#discussion_r20137140
  
    --- Diff: flink-java/src/main/java/org/apache/flink/api/java/DataSet.java 
---
    @@ -246,6 +247,24 @@ public ExecutionEnvironment getExecutionEnvironment() {
                return new Projection<T>(this, fieldIndexes);
        }
        
    +   /**
    +    * Initiates a Project transformation on a {@link Tuple} {@link 
DataSet}.<br/>
    +    * <b>Note: Only Tuple DataSets can be projected.</b></br>
    +    * The transformation projects each Tuple of the DataSet onto a 
(sub)set of fields.</br>
    +    * This method returns a {@link ProjectOperator} to complete the 
transformation.
    +    * 
    +    * @param fieldIndexes The field indexes of the input tuples that are 
retained.
    +    *                                         The order of fields in the 
output tuple corresponds to the order of field indexes.
    +    * @return A ProjectOperator to complete the Project transformation.
    +    * 
    +    * @see Tuple
    +    * @see DataSet
    +    * @see org.apache.flink.api.java.operators.ProjectOperator
    +    */
    +   public <OUT extends Tuple> ProjectOperator<?, OUT> projection(int... 
fieldIndexes) {
    --- End diff --
    
    Having ``project()`` and ``projection()`` methods might confuse users. 
Since this is an evolution of the original ```project()`` method, I'd keep that 
name and simply remove the ``type()`` method in ``ProjectionOperator`` although 
this is an API breaking change.


> Make type() call in projections optional (or remove it)
> -------------------------------------------------------
>
>                 Key: FLINK-1040
>                 URL: https://issues.apache.org/jira/browse/FLINK-1040
>             Project: Flink
>          Issue Type: Improvement
>          Components: Java API
>            Reporter: Stephan Ewen
>            Priority: Minor
>              Labels: simple, starter
>
> I think the type() call should be optional. The compiler can also cast the 
> data set directly and the result type is computed from the input types 
> anyways.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to