autophagy commented on code in PR #27972:
URL: https://github.com/apache/flink/pull/27972#discussion_r3505003707
##########
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:
Nah - we just do a write/load/execute roundtrip, not a plan comparison. We
just want to test whether execute works and the plan compiles, since plan
content is already tested with `test_write_load_compiled_plan`
--
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]