SteNicholas commented on a change in pull request #14822:
URL: https://github.com/apache/flink/pull/14822#discussion_r575254129
##########
File path:
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/stream/table/TableSinkITCase.scala
##########
@@ -922,6 +925,42 @@ class TableSinkITCase extends StreamingTestBase {
}
+ @Test
+ def testSinkProvider(): Unit = {
+ val file = tempFolder.newFolder()
+ tEnv.executeSql(
+ s"""
+ |CREATE TABLE MyFileSinkTable (
+ | `a` STRING,
+ | `b` STRING,
+ | `c` STRING
+ |) WITH (
+ | 'connector' = 'filesink',
+ | 'path' = '${file.getAbsolutePath}'
+ |)
+ |""".stripMargin)
+
+ val stringTupleData3: Seq[(String, String, String)] = {
+ val data = new mutable.MutableList[(String, String, String)]
+ data.+=(("Test", "Sink", "Hi"))
+ data.+=(("Sink", "Provider", "Hello"))
+ data.+=(("Test", "Provider", "Hello world"))
+ data
+ }
+ val table = env.fromCollection(stringTupleData3).toTable(tEnv, 'a, 'b, 'c)
+ table.executeInsert("MyFileSinkTable").await()
+
+ val source = Source.fromFile(new File(file.getAbsolutePath,
file.list()(0)).listFiles()(0).getAbsolutePath)
Review comment:
@wuchong , this couldn't verify the result by simply reading
`MyFileSinkTable` using `SELECT` query. Because the `TestFileTableSink`
generates in progress file which file `FileSource` couldn't read.
----------------------------------------------------------------
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]