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

    https://github.com/apache/flink/pull/1632#discussion_r52826898
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/codegen/CodeGenerator.scala
 ---
    @@ -148,16 +148,24 @@ class CodeGenerator(
           if (clazz == classOf[FlatMapFunction[_,_]]) {
             val inputTypeTerm = boxedTypeTermForTypeInfo(input1)
             (s"void flatMap(Object _in1, org.apache.flink.util.Collector 
$collectorTerm)",
    -          s"$inputTypeTerm $input1Term = ($inputTypeTerm) _in1;")
    +          List(s"$inputTypeTerm $input1Term = ($inputTypeTerm) _in1;"))
           }
     
           // MapFunction
           else if (clazz == classOf[MapFunction[_,_]]) {
             val inputTypeTerm = boxedTypeTermForTypeInfo(input1)
             ("Object map(Object _in1)",
    -          s"$inputTypeTerm $input1Term = ($inputTypeTerm) _in1;")
    +          List(s"$inputTypeTerm $input1Term = ($inputTypeTerm) _in1;"))
           }
     
    +      // FlatJoinFunction
    +      else if (clazz == classOf[FlatJoinFunction[_,_,_]]) {
    +        val inputTypeTerm1 = boxedTypeTermForTypeInfo(input1)
    +        val inputTypeTerm2 = boxedTypeTermForTypeInfo(input2.get) //TODO 
check this
    --- End diff --
    
    Why don't you call `getOrElse` here and throw an CodeGenException if input2 
is not present? Then we can get rid of the TODO.


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