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

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to