hequn8128 commented on a change in pull request #9370: [FLINK-13594][python] 
Improve the 'from_element' method of flink python api to apply to blink planner
URL: https://github.com/apache/flink/pull/9370#discussion_r311380624
 
 

 ##########
 File path: flink-python/pyflink/table/tests/test_calc.py
 ##########
 @@ -97,14 +97,60 @@ def test_from_element(self):
               PythonOnlyPoint(3.0, 4.0))],
             schema)
         t.insert_into("Results")
-        self.t_env.execute("test")
+        t_env.execute("test")
         actual = source_sink_utils.results()
 
         expected = ['1,1.0,hi,hello,1970-01-02,01:00:00,1970-01-02 00:00:00.0,'
-                    '1970-01-02 00:00:00.0,86400000010,[1.0, null],[1.0, 
2.0],[abc],[1970-01-02],'
+                    '1970-01-02 00:00:00.0,86400000,[1.0, null],[1.0, 
2.0],[abc],[1970-01-02],'
                     '1,1,2.0,{key=1.0},[65, 66, 67, 68],[1.0, 2.0],[3.0, 4.0]']
         self.assert_equals(actual, expected)
 
+    def test_blink_from_element(self):
+        t_env = 
BatchTableEnvironment.create(environment_settings=EnvironmentSettings
+                                             
.new_instance().use_blink_planner()
+                                             .in_batch_mode().build())
+        field_names = ["a", "b", "c", "d", "e", "f", "g", "h",
 
 Review comment:
   Maybe we can extract these field_names, field_types, schema and data into a 
base class, similar to the `StreamTestData` in java or scala. In this way, we 
can reuse these source information across all  these python tests.
   
   What do you think?

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