hequn8128 commented on a change in pull request #11130: 
[FLINK-15972][python][table-planner][table-planner-blink] Add Python building 
blocks to make sure the basic functionality of Python TableFunction could work
URL: https://github.com/apache/flink/pull/11130#discussion_r383903241
 
 

 ##########
 File path: flink-python/pyflink/table/table_environment.py
 ##########
 @@ -756,8 +757,12 @@ def register_function(self, name, function):
         :param function: The python user-defined function to register.
         :type function: pyflink.table.udf.UserDefinedFunctionWrapper
         """
-        self._j_tenv.registerFunction(name, 
function._judf(self._is_blink_planner,
-                                                           
self.get_config()._j_table_config))
+        if isinstance(function, UserDefinedScalarFunctionWrapper):
 
 Review comment:
   We can add a base method in `UserDefinedScalarFunctionWrapper` and call the 
method here. For example, we can rename the current `_judf` to 
`_j_user_defined_function`

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to