[
https://issues.apache.org/jira/browse/FLINK-5794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15890682#comment-15890682
]
ASF GitHub Bot commented on FLINK-5794:
---------------------------------------
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/3450#discussion_r103746007
--- Diff: docs/dev/table_api.md ---
@@ -4732,23 +4732,29 @@ User-defined Functions
If a required scalar function is not contained in the built-in functions,
it is possible to define custom, user-defined scalar functions for both the
Table API and SQL. A user-defined scalar functions maps zero, one, or multiple
scalar values to a new scalar value.
-In order to define a scalar function one has to extend the base class
`ScalarFunction` in `org.apache.flink.table.functions` and implement (one or
more) evaluation methods. The behavior of a scalar function is determined by
the evaluation method. An evaluation method must be declared publicly and named
`eval`. The parameter types and return type of the evaluation method also
determine the parameter and return types of the scalar function. Evaluation
methods can also be overloaded by implementing multiple methods named `eval`.
+In order to define a scalar function one has to extend the base class
`ScalarFunction` in `org.apache.flink.table.functions` and implement (one or
more) evaluation methods. Moreover constructor of the user-defined scalar
function can contain constructor arguments. The behavior of a scalar function
is determined by the evaluation method. An evaluation method must be declared
publicly and named `eval`. The parameter types and return type of the
evaluation method also determine the parameter and return types of the scalar
function. Evaluation methods can also be overloaded by implementing multiple
methods named `eval`.
--- End diff --
I would remove the sentence about the constructor because it breaks the
explanation flow.
> update the documentation about “UDF/UDTF" support have parameters
> constructor.
> --------------------------------------------------------------------------------
>
> Key: FLINK-5794
> URL: https://issues.apache.org/jira/browse/FLINK-5794
> Project: Flink
> Issue Type: Sub-task
> Reporter: sunjincheng
> Assignee: sunjincheng
>
> Depends on FLINK-5792 .
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)