[ https://issues.apache.org/jira/browse/FLINK-5881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15878020#comment-15878020 ]
ASF GitHub Bot commented on FLINK-5881: --------------------------------------- GitHub user clarkyzl opened a pull request: https://github.com/apache/flink/pull/3389 [FLINK-5881] [table] ScalarFunction(UDF) should support variable types and variable arguments Type: New Feature Priority: Major Components: table, udf, ScalarFunction Problem Definition: [FLINK-5881] [table] ScalarFunction(UDF) should support variable types and variable arguments Design: 1. Modified the getSignature() method in UserDefinedFunctionUtils, made trailing style of variable arguments can be found. The "(TypeA a, Type B b, TypeC... c)" or "(a: TypeA, b: TypeB, c: TypeC*)" with annotation will pass the method. 2. Modified the SqlOperandTypeChecker, made the count range of sql operands flexible. So it will pass the sql node validation of calcite. 3. Modified the checkAndExtractEvalMethods() method, and throw a human readable VaidataionException if the user specified the variable arguments in Scala and forgot to add the "@varargs" annotation. Please see the discussion in FLINK-5826. Impact Analysis: It's a minor modification and it's a new feature. It impacts minimal in UDF. Test: Added both scala tests and java tests for all apis. You can merge this pull request into a Git repository by running: $ git pull https://github.com/clarkyzl/flink flink-5881 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3389.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3389 ---- commit 60b68fdd66f8021f6f090e7372987d43362d5ef3 Author: Zhuoluo Yang <zhuoluo....@alibaba-inc.com> Date: 2017-02-22T10:53:34Z [FLINK-5881] [table] ScalarFunction(UDF) should support variable types and variable arguments ---- > ScalarFunction(UDF) should support variable types and variable arguments > ------------------------------------------------------------------------- > > Key: FLINK-5881 > URL: https://issues.apache.org/jira/browse/FLINK-5881 > Project: Flink > Issue Type: Sub-task > Reporter: Zhuoluo Yang > Assignee: Zhuoluo Yang > > As a sub-task of FLINK-5826. We would like to support the ScalarFunction > first and make the review a little bit easier. -- This message was sent by Atlassian JIRA (v6.3.15#6346)