Github user aalexandrov commented on the pull request:

    https://github.com/apache/flink/pull/354#issuecomment-72660318
  
    I would advocate to adding this one as well as a fallback option.
    
    I have a situation where I want to use KeySelector that might return Java 
TupleXX instances parameterized with Scala types, e.g.:
    
    ```
    class SelectFoo extends KeySelector[Tuple3[Int, Int, String], Tuple3[Int, 
String]] {
        override def getKey(v: Tuple3[Int, Int, Int]) = new Tuple2(v.f0, v.f2)
    }
    ``
    
    Even though in this cases  the generic parameters are available, the Scala 
types cannot be inferred because the actual type field type parameters are 
erased by Scala and  are seen only as java.lang.Object from the Java reflection 
API.


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