twalthr commented on a change in pull request #16291:
URL: https://github.com/apache/flink/pull/16291#discussion_r663850447
##########
File path:
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/StatementSet.java
##########
@@ -38,6 +38,29 @@
/** add {@link Table} with the given sink table name to the set. */
StatementSet addInsert(String targetPath, Table table, boolean overwrite);
+ /**
+ * Adds a statement to insert {@param table} into a table defined by
{@param descriptor}.
Review comment:
```
Adds a statement that the pipeline defined by the given {@link Table} object
should be written to a
table (backed by a {@link DynamicTableSink}) and expressed via the given
{@link TableDescriptor}.
```
Somehow we should align `executeInsert` and `addInsert`. `StatementSet` is
poorly documented right now.
##########
File path:
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/stream/sql/CalcITCase.scala
##########
@@ -548,4 +548,29 @@ class CalcITCase extends StreamingTestBase {
TestBaseUtils.compareResultAsText(result, "42")
}
+ @Test
+ def testStatementSetInsertUsingTableDescriptor(): Unit = {
Review comment:
Move to `TableSinkITCase` or better just access the `StatementSet` if
possible and avoid a Flink execution.
--
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]