yuzelin commented on code in PR #21187:
URL: https://github.com/apache/flink/pull/21187#discussion_r1046600712


##########
flink-table/flink-sql-gateway/src/main/java/org/apache/flink/table/gateway/service/operation/OperationExecutor.java:
##########
@@ -405,4 +444,22 @@ private Set<TableInfo> listViews(String catalogName, 
String databaseName) {
                                                 TableKind.VIEW))
                         .collect(Collectors.toSet()));
     }
+
+    private void validate(Operation operation) {
+        if (sessionContext.isStatementSetState()) {
+            if (!(operation instanceof SinkModifyOperation
+                    || operation instanceof EndStatementSetOperation
+                    || operation instanceof CreateTableASOperation)) {
+                throw new SqlExecutionException(
+                        "Wrong statement after 'BEGIN STATEMENT SET'.\n"
+                                + "Only 'INSERT/CREATE TABLE AS' statement is 
allowed in Statement Set or use 'END' statement to terminate Statement Set.");

Review Comment:
   OK.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to