GitHub user xccui opened a pull request: https://github.com/apache/flink/pull/6090
[FLINK-8863] [SQL] Add user-defined function support in SQL Client ## What is the purpose of the change This PR aims to add user-defined function (ScalarFunction, TableFunction and AggregateFunction) support to the SQL Client. ## Brief change log - Introduce a new `HierarchyDescriptor` and its corresponding validator `HierarchyDescriptorValidator`, which allow constructing descriptors hierarchically. - Add a `PrimitiveTypeDescriptor` to describe a primitive type value and a `ClassTypeDescriptor` to describe a class type value. A `ClassTypeDescriptor` contains a `constructor` field, which is composed of a list of `PrimitiveTypeDescriptor` or `ClassTypeDescriptor`. - Add a `UDFDescriptor` and its base class `FunctionDescriptor` to describe a `UserDefinedFunction`. Given a `DescriptorProperties`, a `UserDefinedFunction` can be instantiated with the `FunctionValidator.generateUserDefinedFunction()` method. - Add related tests for the new components. ## Verifying this change The change can be verified with the test cases added in `LocalExecutorITCase.java`. ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): (no) - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no) - The serializers: (no) - The runtime per-record code paths (performance sensitive): (no) - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no) - The S3 file system connector: (no) ## Documentation - Does this pull request introduce a new feature? (yes) - If yes, how is the feature documented? (*the doc has not been finished yet*) You can merge this pull request into a Git repository by running: $ git pull https://github.com/xccui/flink FLINK-8863-udf Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/6090.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 #6090 ---- commit c6c7d63f96eda01e24735271859ea8528e229021 Author: Xingcan Cui <xingcanc@...> Date: 2018-05-27T15:36:25Z [FLINK-8863] Add user-defined function support in SQL Client ---- ---