You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/01/27 12:50:31 UTC

[GitHub] [flink] HuangXingBo commented on a change in pull request #14760: [FLINK-20994][python] Add public method to create TableEnvironment in PyFlink.

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:
users@infra.apache.org