You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/12/11 10:42:24 UTC

[GitHub] [flink] danny0405 commented on a change in pull request #10523: [FLINK-15073][sql-client] SQL-CLI fails to run same query multiple times

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

 ##########
 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:
   Conflict with the appended one.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services