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

    https://github.com/apache/flink/pull/4940#discussion_r152919537
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/TableEnvironment.scala
 ---
    @@ -1002,11 +999,13 @@ abstract class TableEnvironment(val config: 
TableConfig) {
              |return ${conversion.resultTerm};
              |""".stripMargin
     
    -    val generated = generator.generateFunction(
    +    val generated = FunctionCodeGenerator.generateFunction(
    +      ctx,
           functionName,
           classOf[MapFunction[Row, OUT]],
           body,
    -      requestedTypeInfo)
    +      requestedTypeInfo,
    +      inputTypeInfo)
    --- End diff --
    
    If both function code generator and expression code generator need 
information about the inputs, wouldn't it make sense to bind the inputs to the 
code generator context? Instead of defining the same inputs twice.


---

Reply via email to