Au-Miner commented on code in PR #28145:
URL: https://github.com/apache/flink/pull/28145#discussion_r3266366580


##########
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/parser/SqlClientSyntaxHighlighter.java:
##########
@@ -47,15 +47,23 @@ public class SqlClientSyntaxHighlighter extends 
DefaultHighlighter {
                             .map(t -> t.replaceAll("\"", ""))
                             .collect(Collectors.toSet()));
 
-    private final Executor executor;
+    private ReadableConfig configuration;
 
     public SqlClientSyntaxHighlighter(Executor executor) {
-        this.executor = executor;
+        updateSessionConfig(executor.getSessionConfig());
+    }
+
+    public void updateSessionConfig(ReadableConfig configuration) {
+        if (configuration != null) {
+            this.configuration = configuration;
+        }
     }
 
     @Override
     public AttributedString highlight(LineReader reader, String buffer) {
-        ReadableConfig configuration = executor.getSessionConfig();
+        if (configuration == null) {

Review Comment:
   Because the current getSessionConfig is not synchronized to be obtained 
every time input is made, it may not be able to obtain the latest 
configuration. Therefore, compared to before, it may be null. Here, super is 
chosen to execute by default



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to