HuangXingBo commented on a change in pull request #14760:
URL: https://github.com/apache/flink/pull/14760#discussion_r565280413



##########
File path: flink-python/pyflink/table/table_environment.py
##########
@@ -1045,7 +1059,8 @@ def register_java_function(self, name: str, 
function_class_name: str):
             .loadClass(function_class_name).newInstance()
         # this is a temporary solution and will be unified later when we use 
the new type
         # system(DataType) to replace the old type system(TypeInformation).
-        if self._is_blink_planner and isinstance(self, BatchTableEnvironment):
+        if self._is_blink_planner and not isinstance(self, 
StreamTableEnvironment) \
+                or self._unified:

Review comment:
       in one line?

##########
File path: flink-python/pyflink/table/table_environment.py
##########
@@ -1090,7 +1105,8 @@ def register_function(self, name: str, function: 
UserDefinedFunctionWrapper):
         java_function = function._java_user_defined_function()
         # this is a temporary solution and will be unified later when we use 
the new type
         # system(DataType) to replace the old type system(TypeInformation).
-        if self._is_blink_planner and isinstance(self, BatchTableEnvironment):
+        if self._is_blink_planner and isinstance(self, BatchTableEnvironment) \
+                or self._unified:

Review comment:
       ditto




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


Reply via email to