Github user twalthr commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2337#discussion_r77777227
  
    --- Diff: 
flink-core/src/main/java/org/apache/flink/api/common/typeinfo/TypeInformation.java
 ---
    @@ -122,14 +123,25 @@
        public abstract Class<T> getTypeClass();
     
        /**
    -    * Returns the generic parameters of this type.
    +    * Optional method for giving Flink's type extraction system 
information about the mapping
    +    * of a generic type parameter to the type information of a subtype. 
This information is necessary
    +    * in cases where type information should be deduced from an input type.
         *
    -    * @return The list of generic parameters. This list can be empty.
    +    * For instance, a method for a {@link Tuple2} would look like this:
    +    * <code>
    +    * Map m = new HashMap();
    +    * m.put("T0", this.getTypeAt(0));
    +    * m.put("T1", this.getTypeAt(1));
    +    * return m;
    +    * </code>
    +    *
    +    * @return map of inferred subtypes; it must not contain all generic 
parameters as key;
    --- End diff --
    
    You are right, "it doesn't have to contain..." would be better. What I 
wanted to say is: It is also ok to just supply partial type information for 
generic parameters (so returning an empty map is always acceptable).


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to