wuchong commented on a change in pull request #9781: [FLINK-14098] Support 
multiple statements for TableEnvironment.
URL: https://github.com/apache/flink/pull/9781#discussion_r329342510
 
 

 ##########
 File path: 
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableEnvironmentImpl.java
 ##########
 @@ -323,38 +324,38 @@ public void insertInto(Table table, String path, 
String... pathContinued) {
 
        @Override
        public void sqlUpdate(String stmt) {
-               List<Operation> operations = planner.parse(stmt);
-
-               if (operations.size() != 1) {
-                       throw new TableException(
-                               "Unsupported SQL query! sqlUpdate() only 
accepts a single SQL statement of type " +
-                                       "INSERT, CREATE TABLE, DROP TABLE");
-               }
+               Consumer<Operation> operationPreConsumer = operation -> {
 
 Review comment:
   Thanks for the explanation. I get it. 
   How about changing the return type of `Planner#parse` from `List<Operation>` 
to `Iterable<Operation>`? In this way, we can process the lazily produced 
Operation one by one. 
   
   What do you think about this problem? @twalthr @dawidwys @godfreyhe 

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to