flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timo Walther (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-5678) User-defined TableFunctions do not support all types of parameters
Date Fri, 27 Jan 2017 14:06:25 GMT

    [ https://issues.apache.org/jira/browse/FLINK-5678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15842903#comment-15842903
] 

Timo Walther commented on FLINK-5678:
-------------------------------------

The described autocasting "DATE/TIME is equal to int, TIMESTAMP is equal to long." does also
not work for TableFunctions.

> User-defined TableFunctions do not support all types of parameters
> ------------------------------------------------------------------
>
>                 Key: FLINK-5678
>                 URL: https://issues.apache.org/jira/browse/FLINK-5678
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API & SQL
>            Reporter: Timo Walther
>
> It seems that TableFunctions do not support all types of parameters. E.g.
> {code}
> 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);
> 	}
> }
> {code}
> leads to
> {code}
> 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)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message