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

    https://github.com/apache/flink/pull/3623#discussion_r110381407
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/schema/DeferredTypeFlinkTableFunction.scala
 ---
    @@ -40,6 +43,10 @@ class DeferredTypeFlinkTableFunction(
         val implicitResultType: TypeInformation[_])
       extends FlinkTableFunction(tableFunction, evalMethod) {
     
    +  val paramTypeInfos = evalMethod.getParameterTypes.map { paramType =>
    +    TypeExtractor.getForClass(paramType)
    --- End diff --
    
    I noticed that the semantics of how the type lists are obtained are a bit 
different in both cases. In `UserDefinedFunctionUtils` we look at the 
parameters that are handed to the function. Here we look at the signature of 
the `eval` method. The result will be different if the `eval` method is called 
with more specific types than its signature has, e.g., if we have `eval(Object 
o1, Object o2)` and call it with `eval(new Integer(1), new String("Hello"))`. 
    
    Both approaches make sense:
    1. parameter types are more specific
    2. with signature types it is easier to identify which eval() method is 
called.
    
    What do you think @clarkyzl, @KurtYoung?


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