Details
-
Sub-task
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
Description
For ScalarFunctions, the return type of an eval method can be declared with a @DataTypeHint:
@DataTypeHint("INT") public Integer eval(Integer value) { return value * 2; }
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.
Attachments
Issue Links
- links to