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 Fri, 12 Dec 2014 11:49:46 GMT
Github user StephanEwen commented on a diff in the pull request:

    --- Diff: flink-java/src/main/java/org/apache/flink/api/java/DataSet.java ---
    @@ -125,6 +130,11 @@ public ExecutionEnvironment getExecutionEnvironment() {
     	 * @see TypeInformation
     	public TypeInformation<T> getType() {
    +		if (type == null) {
    +			throw new InvalidTypesException("The return type could not be determined automatically.
    --- End diff --
    I think we need to be a bit better with the error message. This basically says "didn't
work, go figure it out". Directing to the log is not quite as good as giving the right error
message a the right place.
    In a prior version, the code had a "MissingTypeInfo". I think that was good because that
missing type info can hold:
      - The operator (name) where the return type was not determined
      - And the reason for the failure (the exception from the type extractor)
    Instead of directing the user to the log, we can throw an exception and in that exception
describe exactly which operation it was, what the cause was, and we can chain the original

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.

View raw message