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

    https://github.com/apache/flink/pull/4536#discussion_r135430161
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/schema/FlinkTableFunctionImpl.scala
 ---
    @@ -36,10 +36,8 @@ import org.apache.flink.table.calcite.FlinkTypeFactory
     class FlinkTableFunctionImpl[T](
         val typeInfo: TypeInformation[T],
         val fieldIndexes: Array[Int],
    -    val fieldNames: Array[String],
    -    val evalMethod: Method)
    -  extends ReflectiveFunctionBase(evalMethod)
    --- End diff --
    
    In the first implementation of UDTF, we use `ReflectiveFunctionBase` to 
infer the operand types. But with the new approach in this PR, we customize a 
`SqlOperandTypeChecker` to check operands which means we don't need the 
`ReflectiveFunctionBase` anymore. If we extends `ReflectiveFunctionBase` we 
have to register every `eval` method as a UDTF. But with the new approach in 
this PR, we only need to register once.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to