Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-5678

User-defined TableFunctions do not support all types of parameters

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.1
    • Component/s: Table API & SQL
    • Labels:
      None

      Description

      It seems that TableFunctions do not support all types of parameters. E.g.

      XXX.select("1000L AS time").join("mytf(time)");
      
      public static class MyTableFunction extends TableFunction<Row> {
      	public void eval(Long ts) {
      		Row r = new Row(2);
      		r.setField(0, ts);
      		collect(r);
      	}
      }
      

      leads to

      Exception in thread "main" org.apache.flink.table.codegen.CodeGenException: No matching signature found.
      	at org.apache.flink.table.codegen.calls.TableFunctionCallGen$$anonfun$1.apply(TableFunctionCallGen.scala:47)
      	at org.apache.flink.table.codegen.calls.TableFunctionCallGen$$anonfun$1.apply(TableFunctionCallGen.scala:47)
      	at scala.Option.getOrElse(Option.scala:120)
      	at org.apache.flink.table.codegen.calls.TableFunctionCallGen.generate(TableFunctionCallGen.scala:47)
      	at org.apache.flink.table.codegen.CodeGenerator.visitCall(CodeGenerator.scala:1011)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jark Jark Wu
                Reporter:
                twalthr Timo Walther
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: