dianfu commented on a change in pull request #11749: [FLINK-16669][python][table] Support Python UDF in SQL function DDL. URL: https://github.com/apache/flink/pull/11749#discussion_r409973118
########## File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/functions/FunctionDefinitionUtil.java ########## @@ -33,8 +54,36 @@ public static FunctionDefinition createFunctionDefinition(String name, String cl String.format("Failed instantiating '%s'", className), e); } + return createFunctionDefinitionInternal(name, (UserDefinedFunction) func); + } + + private static FunctionDefinition createPythonFunctionDefinition( + String name, + String fullyQualifiedName, + ReadableConfig config) { + Object func; + try { + Class pythonFunctionFactory = Class.forName( + "org.apache.flink.client.python.PythonFunctionFactory", + true, + Thread.currentThread().getContextClassLoader()); + func = pythonFunctionFactory.getMethod( + "getPythonFunction", + String.class, + ReadableConfig.class) + .invoke(null, fullyQualifiedName, config); + Review comment: remove the empty line ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services