zjuwangg commented on a change in pull request #10419: 
[FLINK-15026][SQL-CLIENT]Support create/drop/alter database in sql client
URL: https://github.com/apache/flink/pull/10419#discussion_r354081363
 
 

 ##########
 File path: 
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/local/LocalExecutor.java
 ##########
 @@ -544,6 +544,11 @@ public ProgramTargetDescriptor executeUpdate(String 
sessionId, String statement)
                        String statement) {
                applyUpdate(context, context.getTableEnvironment(), 
context.getQueryConfig(), statement);
 
+               //Todo: we should refactor following condition after 
TableEnvironment has support submit job directly.
+               if (!statement.trim().matches("(INSERT\\s+INTO.*)")) {
 
 Review comment:
   `applyUpdate` method indeed call the TableEnvironment.sqlUpdate method, an 
operation like ddl get executed in the current design logic while `insert into 
` will be buffered until `execute` method gets called.
   So now it's a little hack way to deal with "INSERT INTO".

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