KurtYoung commented on a change in pull request #10454: [FLINK-13195][sql-client] Add create(drop) table support for SqlClient URL: https://github.com/apache/flink/pull/10454#discussion_r355094124
########## File path: flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/local/LocalExecutor.java ########## @@ -198,37 +198,24 @@ public void start() { // nothing to do yet } - /** - * Create a new {@link ExecutionContext} by merging the default environment the the environment in session context. - */ - private ExecutionContext<?> createExecutionContext(SessionContext sessionContext) { - Environment mergedEnv = Environment.merge(defaultEnvironment, sessionContext.getSessionEnv()); - return createExecutionContext(mergedEnv, sessionContext); - } - - /** - * Create a new {@link ExecutionContext} by using the given environment. - */ - private ExecutionContext<?> createExecutionContext(Environment environment, SessionContext sessionContext) { - try { - return new ExecutionContext<>( - environment, - sessionContext, - dependencies, - flinkConfig, - clusterClientServiceLoader, - commandLineOptions, - commandLines); - } catch (Throwable t) { - // catch everything such that a configuration does not crash the executor - throw new SqlExecutionException("Could not create execution context.", t); - } + /** Returns ExecutionContext.Builder with given {@link SessionContext} session context. */ + private ExecutionContext.Builder createExecutionContextBuilder(SessionContext sessionContext) { + return ExecutionContext.builder( + defaultEnvironment, + sessionContext, + this.dependencies, + this.flinkConfig, + this.clusterClientServiceLoader, + this.commandLineOptions, + this.commandLines); } @Override public String openSession(SessionContext sessionContext) throws SqlExecutionException { String sessionId = sessionContext.getSessionId(); - ExecutionContext previousContext = this.contextMap.putIfAbsent(sessionId, createExecutionContext(sessionContext)); + ExecutionContext previousContext = this.contextMap.putIfAbsent( Review comment: change `ExecutionContext` to `ExecutionContext<?>` ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services