hequn8128 commented on a change in pull request #11342: [FLINK-16483][python] 
Add Python building blocks to make sure the basic functionality of vectorized 
Python UDF could work
URL: https://github.com/apache/flink/pull/11342#discussion_r389532863
 
 

 ##########
 File path: flink-python/pyflink/table/udf.py
 ##########
 @@ -297,15 +308,17 @@ def _get_python_env():
     return 
gateway.jvm.org.apache.flink.table.functions.python.PythonEnv(exec_type)
 
 
-def _create_udf(f, input_types, result_type, deterministic, name):
-    return UserDefinedScalarFunctionWrapper(f, input_types, result_type, 
deterministic, name)
+def _create_udf(f, input_types, result_type, udf_type, deterministic, name):
+    return UserDefinedScalarFunctionWrapper(
+        f, input_types, result_type, udf_type, deterministic, name)
 
 
 def _create_udtf(f, input_types, result_types, deterministic, name):
     return UserDefinedTableFunctionWrapper(f, input_types, result_types, 
deterministic, name)
 
 
-def udf(f=None, input_types=None, result_type=None, deterministic=None, 
name=None):
+def udf(f=None, input_types=None, result_type=None, deterministic=None, 
name=None,
+        udf_type="general"):
 
 Review comment:
   How about adding a `PythonFunctionKind` class which contains `GENERAL` and 
`PANDAS`? It is consistent with Java and also would be easier for users to add 
the parameter.

----------------------------------------------------------------
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

Reply via email to