flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From twalthr <...@git.apache.org>
Subject [GitHub] flink pull request #2545: [FLINK-4673] [core] TypeInfoFactory for Either typ...
Date Mon, 10 Oct 2016 13:04:05 GMT
Github user twalthr commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2545#discussion_r82598976
  
    --- Diff: flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java
---
    @@ -675,38 +673,6 @@ else if (isClassType(t) && Tuple.class.isAssignableFrom(typeToClass(t)))
{
     			return new TupleTypeInfo(typeToClass(t), subTypesInfo);
     			
     		}
    -		// check if type is a subclass of Either
    -		else if (isClassType(t) && Either.class.isAssignableFrom(typeToClass(t))) {
    -			Type curT = t;
    -
    -			// go up the hierarchy until we reach Either (with or without generics)
    -			// collect the types while moving up for a later top-down
    -			while (!(isClassType(curT) && typeToClass(curT).equals(Either.class))) {
    -				typeHierarchy.add(curT);
    -				curT = typeToClass(curT).getGenericSuperclass();
    -			}
    -
    -			// check if Either has generics
    -			if (curT instanceof Class<?>) {
    -				throw new InvalidTypesException("Either needs to be parameterized by using generics.");
    -			}
    -
    -			typeHierarchy.add(curT);
    -
    -			// create the type information for the subtypes
    -			final TypeInformation<?>[] subTypesInfo = createSubTypesInfo(t, (ParameterizedType)
curT, typeHierarchy, in1Type, in2Type, false);
    -			// type needs to be treated a pojo due to additional fields
    -			if (subTypesInfo == null) {
    -				if (t instanceof ParameterizedType) {
    -					return (TypeInformation<OUT>) analyzePojo(typeToClass(t), new ArrayList<Type>(typeHierarchy),
(ParameterizedType) t, in1Type, in2Type);
    --- End diff --
    
    Sorry, for the delay. I will have a look at it again.


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