You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/08/14 12:47:00 UTC
[jira] [Updated] (FLINK-18683) Support @DataTypeHint for
TableFunction output types
[ https://issues.apache.org/jira/browse/FLINK-18683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated FLINK-18683:
-----------------------------------
Labels: pull-request-available (was: )
> Support @DataTypeHint for TableFunction output types
> ----------------------------------------------------
>
> Key: FLINK-18683
> URL: https://issues.apache.org/jira/browse/FLINK-18683
> Project: Flink
> Issue Type: Sub-task
> Components: Table SQL / API
> Reporter: Fabian Hueske
> Assignee: Timo Walther
> Priority: Minor
> Labels: pull-request-available
>
> For ScalarFunctions, the return type of an eval method can be declared with a {{@DataTypeHint}}:
> {code:java}
> @DataTypeHint("INT")
> public Integer eval(Integer value) {
> return value * 2;
> }{code}
> This does not work for TableFunctions because the {{@DataTypeHint}} annotation refers to the {{void}} return type. Hence, {{TableFunction}} {{eval()}} methods must always be annotated with the more complex {{@FunctionHint}} method.
> However, I think that context, it is clear that the {{@DataTypeHint}} annotation refers to the actual return type of the table function (the type parameter of {{TableFunction<OUT>}}).
> We could consider allowing {{@DataTypeHint}} annotations also on {{TableFunction}} classes (defining the output type of all eval methods) and {{eval()}} methods.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)