godfreyhe commented on a change in pull request #18363:
URL: https://github.com/apache/flink/pull/18363#discussion_r805167560
##########
File path: docs/content/docs/dev/table/sql/insert.md
##########
@@ -271,4 +276,37 @@ INSERT INTO students
```
+## Insert into multiple tables
+The `STATEMENT SET` can be used to insert data into multiple tables in a
statement.
+
+### Syntax
+
+```sql
+EXECUTE STATEMENT SET
+BEGIN
+insert_spec;
+...
+insert_spec;
+END;
+
+insert_spec:
+ {insert_from_select}|{insert_from_values}
Review comment:
I do not see the variable definition
##########
File path: docs/content/docs/dev/table/sql/insert.md
##########
@@ -271,4 +276,37 @@ INSERT INTO students
```
+## Insert into multiple tables
+The `STATEMENT SET` can be used to insert data into multiple tables in a
statement.
+
+### Syntax
+
+```sql
+EXECUTE STATEMENT SET
+BEGIN
+insert_spec;
+...
+insert_spec;
+END;
+
+insert_spec:
+ {insert_from_select}|{insert_from_values}
Review comment:
We should keep the same style, use `<>` instead of `{}`, see with.md or
explain.md
##########
File path: docs/content/docs/dev/table/sql/explain.md
##########
@@ -288,4 +288,4 @@ EXPLAIN [([ExplainDetail[, ExplainDetail]*]) | PLAN FOR]
<query_statement_or_ins
```
For query syntax, please refer to [Queries]({{< ref
"docs/dev/table/sql/queries/overview" >}}) page.
-For INSERT, please refer to [INSERT]({{< ref "docs/dev/table/sql/insert" >}})
page.
+For INSERT, the statement can be either a single insert or a statement set,
please refer to [INSERT]({{< ref "docs/dev/table/sql/insert" >}}) page.
Review comment:
Although read the document of `insert.md`, users may do not know the
syntax of `explain statement set begin ... end`
##########
File path: flink-table/flink-sql-client/src/test/resources/sql/set.q
##########
@@ -48,6 +48,7 @@ set;
'pipeline.jars' = ''
'rest.port' = '$VAR_REST_PORT'
'table.exec.sink.legacy-cast-behaviour' = 'DISABLED'
+'table.optimizer.allow-partial-parse' = 'true'
Review comment:
I do not think we should support it now because table env api does not
support parsing multiple line now.
--
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]