docete commented on a change in pull request #10523: [FLINK-15073][sql-client] 
SQL-CLI fails to run same query multiple times
URL: https://github.com/apache/flink/pull/10523#discussion_r356479189
 
 

 ##########
 File path: 
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/local/LocalExecutor.java
 ##########
 @@ -638,6 +638,14 @@ public ProgramTargetDescriptor executeUpdate(String 
sessionId, String statement)
                        result.close();
                        // catch everything such that the query does not crash 
the executor
                        throw new SqlExecutionException("Invalid SQL query.", 
t);
+               } finally {
+                       // Remove the temporal table object.
+                       context.wrapClassLoader(() -> {
+                               final TableEnvironment tableEnvironment = 
context.getTableEnvironment();
+                               tableEnvironment
+                                               
.dropTemporaryTable(String.format("`%s`", jobName.replaceAll("`", "")));
 
 Review comment:
   why remove all "`"?

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