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

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

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

    https://github.com/apache/incubator-flink/pull/203#discussion_r21818932
  
    --- Diff: flink-java/src/main/java/org/apache/flink/api/java/DataSet.java 
---
    @@ -98,14 +99,18 @@ protected DataSet(ExecutionEnvironment context, 
TypeInformation<T> type) {
                        throw new NullPointerException("context is null");
                }
     
    -           if (type == null) {
    -                   throw new NullPointerException("type is null");
    -           }
    -           
                this.context = context;
                this.type = type;
        }
     
    +   protected void setType(TypeInformation<T> type) {
    --- End diff --
    
    Okay, that makes sense.
    
    How about we add a flag to make sure that the `fillInTypeInfo()` cannot be 
called after the `getType()` method was called? That way we make sure that we 
do not make things inconsistent (by returning some type info at some point, and 
another one later). This should not happen anyways, but I would feel much 
better with this sanity check in place - after all, this can cause very hard to 
debug issues, if used inconsistently.


> Introduce TypeHints for Java API operators
> ------------------------------------------
>
>                 Key: FLINK-1245
>                 URL: https://issues.apache.org/jira/browse/FLINK-1245
>             Project: Flink
>          Issue Type: Improvement
>          Components: Java API
>            Reporter: Timo Walther
>            Assignee: Timo Walther
>
> Due to type extraction issues with Java 8 Lambdas and many users with type 
> erasure issues, TypeHints need to be introduced.
> The whole discussion can be found on the mailing list:
> http://mail-archives.apache.org/mod_mbox/flink-dev/201410.mbox/%[email protected]%3E



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

Reply via email to