dianfu commented on a change in pull request #8401: [FLINK-12407][python] Add 
all table operators align Java Table API.
URL: https://github.com/apache/flink/pull/8401#discussion_r283604935
 
 

 ##########
 File path: flink-python/pyflink/table/table_config.py
 ##########
 @@ -44,18 +47,55 @@ def parallelism(self):
     def parallelism(self, parallelism):
         self._parallelism = parallelism
 
+    @property
+    def timezone(self):
+        return self._j_table_config.getTimeZone().getID()
+
+    @timezone.setter
+    def timezone(self, timezone_id):
+        if timezone_id is not None and isinstance(timezone_id, str):
+            j_timezone = self._jvm.java.util.TimeZone.getTimeZone(timezone_id)
+            self._j_table_config.setTimeZone(j_timezone)
+        else:
+            raise Exception("TableConfig.timezone should be a string!")
+
+    @property
+    def null_check(self):
+        return self._j_table_config.getNullCheck()
+
+    @null_check.setter
+    def null_check(self, null_check):
+        if null_check is not None and isinstance(null_check, bool):
+            self._j_table_config.setNullCheck(null_check)
+        else:
+            raise Exception("TableConfig.null_check should be a bool value!")
+
+    @property
+    def max_generated_code_length(self):
+        return self._j_table_config.getMaxGeneratedCodeLength()
 
 Review comment:
   I think this method is needed as Python API program is just an API and the 
Java code-gen logic is shared by both Java/Scala/Python API.

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