flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From StephanEwen <...@git.apache.org>
Subject [GitHub] incubator-flink pull request: [FLINK-1245] Introduce TypeHints for...
Date Mon, 15 Dec 2014 11:49:48 GMT
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.


---
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