godfreyhe commented on a change in pull request #11544: [FLINK-16822] 
[sql-client] `table.xx` property set from CLI should also be set into 
SessionState's TableConfig
URL: https://github.com/apache/flink/pull/11544#discussion_r399738426
 
 

 ##########
 File path: 
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/local/LocalExecutor.java
 ##########
 @@ -281,13 +283,18 @@ public void setSessionProperty(String sessionId, String 
key, String value) throw
                ExecutionContext<?> context = getExecutionContext(sessionId);
                Environment env = context.getEnvironment();
                Environment newEnv = Environment.enrich(env, 
ImmutableMap.of(key, value), ImmutableMap.of());
+               ExecutionContext.SessionState sessionState = 
context.getSessionState();
+               // update table config
+               newEnv.getConfiguration().asMap().forEach((k, v) ->
+                               
sessionState.config.getConfiguration().setString(k, v));
 
 Review comment:
   good catch, we should store the original `SessionState` for resetting all 
properties to initial state.

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

Reply via email to