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 [email protected] or file a JIRA ticket
with INFRA.
---