KarmaGYZ commented on code in PR #22768: URL: https://github.com/apache/flink/pull/22768#discussion_r1364801781
########## flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/resource/ClientResourceManager.java: ########## @@ -59,4 +68,10 @@ public URL unregisterJarResource(String jarPath) { String.format("Failed to unregister the jar resource [%s]", jarPath), e); } } + + @Override + public ResourceManager copy() { + return new ClientResourceManager( + localResourceDir, new HashMap<>(resourceInfos), userClassLoader); Review Comment: Do we also need to deep copy the localResourceDir and userclassLoader? ########## flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/resource/ResourceManager.java: ########## @@ -232,6 +241,10 @@ public void addJarConfiguration(TableConfig tableConfig) { tableConfig.set(PipelineOptions.JARS, new ArrayList<>(jarFiles)); } + public ResourceManager copy() { + return new ResourceManager(localResourceDir, new HashMap<>(resourceInfos), userClassLoader); Review Comment: ditto ########## flink-table/flink-sql-gateway/src/main/java/org/apache/flink/table/gateway/service/operation/OperationExecutor.java: ########## @@ -176,14 +184,17 @@ public ResultFetcher configureSession(OperationHandle handle, String statement) return callSetOperation(tableEnv, handle, (SetOperation) op); } else if (op instanceof ResetOperation) { return callResetOperation(handle, (ResetOperation) op); + } else if (op instanceof AddJarOperation) { + return callExecutableOperation(handle, (ExecutableOperation) op); Review Comment: Now, all the operation will use the origin resource manager in this method. Is it in expected? If so, this branch might be unnecessary -- 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