This is an automated email from the ASF dual-hosted git repository.

twalthr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit d54fde128acc0b6c53e4792fd0d6eeaa98549068
Author: Timo Walther <twal...@apache.org>
AuthorDate: Mon Oct 22 13:48:01 2018 +0200

    [FLINK-9737] [table] Make function validation optional
---
 .../scala/org/apache/flink/table/functions/FunctionService.scala  | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/FunctionService.scala
 
b/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/FunctionService.scala
index ed2f5ef..d1d9552 100644
--- 
a/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/FunctionService.scala
+++ 
b/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/FunctionService.scala
@@ -47,18 +47,22 @@ object FunctionService extends Logging {
     *
     * @param descriptor the descriptor that describes a function
     * @param classLoader the class loader to load the function and its 
parameter's classes
+    * @param performValidation whether or not the descriptor should be 
validated
     * @return the generated user-defined function
     */
   def createFunction(
       descriptor: FunctionDescriptor,
-      classLoader: ClassLoader)
+      classLoader: ClassLoader,
+      performValidation: Boolean = true)
     : UserDefinedFunction = {
 
     val descriptorProperties = new DescriptorProperties(true)
     descriptor.addProperties(descriptorProperties)
 
     // validate
-    new FunctionDescriptorValidator().validate(descriptorProperties)
+    if (performValidation) {
+      new FunctionDescriptorValidator().validate(descriptorProperties)
+    }
 
     // instantiate
     val (instanceClass, instance) = generateInstance[AnyRef](

Reply via email to