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

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

Github user uce commented on the pull request:

    https://github.com/apache/incubator-flink/pull/194#issuecomment-64593654
  
    While trying around locally I noticed a problem. The current master catches 
the type mismatch in the following program during compilation time, whereas the 
new branch does not. The resulting output is still correct, but we want to 
still be able to catch these mismatches, no?
    
    ```java
    final ExecutionEnvironment env = 
ExecutionEnvironment.getExecutionEnvironment();
    
    Tuple2<Integer, Integer>[] data = new Tuple2Builder<Integer, Integer>()
                .add(0, 1)
                .add(2, 3)
                .add(4, 5)
                .build();
    
    DataSet<Tuple2<Integer, Integer>> input =  env.fromElements(data);
    
    DataSet<Tuple2<Integer, String>> output = input.project(0, 
0).types(Integer.class, Integer.class);
    
    output.print();
    env.execute();
    ```


> 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