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

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_r20137458
  
    --- Diff: 
flink-java/src/main/java/org/apache/flink/api/java/operators/CrossOperator.java 
---
    @@ -203,13 +251,40 @@ public DefaultCross(DataSet<I1> input1, DataSet<I2> 
input2) {
         * @see Tuple
         * @see DataSet
         */
    -   private static final class ProjectCross<I1, I2, OUT extends Tuple> 
extends CrossOperator<I1, I2, OUT> {
    +// private static final class ProjectCross<I1, I2, OUT extends Tuple> 
extends CrossOperator<I1, I2, OUT> {
    +   public static final class ProjectCross<I1, I2, OUT extends Tuple> 
extends CrossOperator<I1, I2, OUT> {
    +           
    +           private CrossProjection<I1, I2> crossProjection;
     
                protected ProjectCross(DataSet<I1> input1, DataSet<I2> input2, 
int[] fields, boolean[] isFromFirst, TupleTypeInfo<OUT> returnType) {
                        super(input1, input2,
                                new ProjectCrossFunction<I1, I2, OUT>(fields, 
isFromFirst, returnType.createSerializer().createInstance()), returnType);
    +                   
    +                   crossProjection = null;
    +           }
    +           
    +           protected ProjectCross(DataSet<I1> input1, DataSet<I2> input2, 
int[] fields, boolean[] isFromFirst, TupleTypeInfo<OUT> returnType, 
CrossProjection<I1, I2> crossProjection) {
    +                   super(input1, input2,
    +                           new ProjectCrossFunction<I1, I2, OUT>(fields, 
isFromFirst, returnType.createSerializer().createInstance()), returnType);
    +                   
    +                   this.crossProjection = crossProjection;
    +           }
    +           
    +           @SuppressWarnings("hiding")
    +           public <OUT extends Tuple> ProjectCross<I1, I2, OUT> 
projectionFirst(int... firstFieldIndexes) {
    --- End diff --
    
    rename to ``projectFirst()`` and ``projectSecond()``


> 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