Airblader commented on a change in pull request #16290:
URL: https://github.com/apache/flink/pull/16290#discussion_r658632504
##########
File path:
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/stream/sql/CalcITCase.scala
##########
@@ -548,4 +548,26 @@ class CalcITCase extends StreamingTestBase {
TestBaseUtils.compareResultAsText(result, "42")
}
+ @Test
+ def testExecuteInsertToTableDescriptor(): Unit = {
+ val schema = Schema.newBuilder()
+ .column("f0", DataTypes.INT())
+ .build();
+
+ val tableId = TestValuesTableFactory.registerData(Seq(row(42)))
+ tEnv.createTemporaryTable("T", TableDescriptor.forConnector("values")
+ .schema(schema)
+ .option("data-id", tableId)
+ .option("bounded", "true")
+ .build())
+
+ val tableResult =
tEnv.from("T").executeInsert(TableDescriptor.forConnector("values")
+ .schema(schema)
+ .build())
+
+ tableResult.await()
+ // TODO FLINK-23067 This only works if the test is run in isolation
+ assertEquals(Seq("42"),
TestValuesTableFactory.getResults("Unnamed_TableDescriptor$1").toList)
Review comment:
I'll need to figure out a way to do this still. An easy answer would be
to allow setting the counter in `TableDescriptorUtil` and fixing it to a
specific number, but I want to see if there's something better.
--
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]