raminqaf commented on code in PR #27972:
URL: https://github.com/apache/flink/pull/27972#discussion_r3504918479


##########
flink-python/pyflink/table/tests/test_compiled_plan.py:
##########
@@ -97,6 +102,47 @@ def test_write_load_compiled_plan(self):
                 compiled_plan.as_json_string(), 
compiled_plan_from_string.as_json_string()
             )
 
+    def test_load_plan_execute(self):
+        schema = Schema.new_builder().column("f0", DataTypes.STRING()).build()
+        table = self.t_env.from_descriptor(
+            TableDescriptor.for_connector("datagen")
+            .option("number-of-rows", "5")
+            .schema(schema)
+            .build()
+        )
+        self.t_env.create_temporary_table(
+            "Sink",
+            TableDescriptor.for_connector("blackhole").schema(schema).build(),
+        )
+
+        compiled_plan = table.insert_into("Sink").compile_plan()
+        plan_path = Path(self.tempdir + "/plan.json")

Review Comment:
   ~~Shouldn't there be a generated plan.json file in the PR? 🤔~~
   Ah correcting: It is written into the tempdir and loaded again to execute! 



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to