flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From twalthr <...@git.apache.org>
Subject [GitHub] incubator-flink pull request: [FLINK-1245] Introduce TypeHints for...
Date Fri, 12 Dec 2014 13:27:44 GMT
Github user twalthr commented on a diff in the pull request:

    https://github.com/apache/incubator-flink/pull/203#discussion_r21743690
  
    --- 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 --
    
    I would allow to set the type info twice, because of 2 reasons: 
    - If the type extractor extracts something wrong (what could happen due to the complexity
of POJOs), the user can use type hints as a workaround and overwrite the wrong type extraction
result.
    - If the user uses lambdas in IntelliJ and gives TypeHints, he will get a IllegalStateExpection
when building the project with maven.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message