davidradl commented on code in PR #25528:
URL: https://github.com/apache/flink/pull/25528#discussion_r1916698975
##########
flink-python/pyflink/table/tests/test_table_environment_api.py:
##########
@@ -443,6 +443,23 @@ def test_to_data_stream_local_time(self):
'+I[2, 1970-06-07, 08:09:10, 1970-06-07T08:09:10]']
self.assertEqual(expected, results)
+ def test_to_data_stream(self):
+ self.env.set_parallelism(1)
+ t_env = StreamTableEnvironment.create(
+ self.env,
+ environment_settings=EnvironmentSettings.in_streaming_mode())
+ table = t_env.from_elements([(1, "Hi", "Hello"), (2, "Hello", "Hi")],
["a", "b", "c"])
+ new_table = table.select(table.a + 1, table.b + 'flink', table.c)
+ ds = t_env.to_data_stream(table=new_table,
type_info=Types.ROW([Types.LONG(),
+
Types.STRING(),
+
Types.STRING()]))
+ test_sink = DataStreamTestSinkFunction()
+ ds.add_sink(test_sink)
+ self.env.execute("test_to_data_stream")
Review Comment:
can we test deletes and updates error cases?
--
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]