godfreyhe commented on a change in pull request #12657:
URL: https://github.com/apache/flink/pull/12657#discussion_r440569344



##########
File path: 
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/local/LocalExecutor.java
##########
@@ -462,7 +462,7 @@ public ResolvedExpression parseSqlExpression(String 
sqlExpression, TableSchema i
        @Override
        public ResultDescriptor executeQuery(String sessionId, String query) 
throws SqlExecutionException {
                final ExecutionContext<?> context = 
getExecutionContext(sessionId);
-               return executeQueryInternal(sessionId, context, query);
+               return context.wrapClassLoader(() -> 
executeQueryInternal(sessionId, context, query));

Review comment:
       most operations in `executeQueryInternal ` method and 
`executeUpdateInternal` method are already wrapped in user classloader, only 
`deployer.deploy()` is  needed. Otherwise, it's better we should remove those 
wrappers.  btw, add some tests in sql client to verify the fix ?




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


Reply via email to