fsk119 commented on code in PR #21141:
URL: https://github.com/apache/flink/pull/21141#discussion_r1030264916


##########
flink-table/flink-sql-gateway/src/main/java/org/apache/flink/table/gateway/service/SqlGatewayServiceImpl.java:
##########
@@ -311,6 +312,13 @@ public GatewayInfo getGatewayInfo() {
         return GatewayInfo.INSTANCE;
     }
 
+    @Override
+    public List<String> completeStatement(
+            SessionHandle sessionHandle, String statement, int position)
+            throws SqlGatewayException {
+        return 
getSession(sessionHandle).createExecutor().getCompletionHints(statement, 
position);

Review Comment:
   I think the completeStatement should be thread-safe and we should translate 
to operation and let the OperaitonManager to fire the execution. The reason 
behind is the `SqlAdvisor` will visit the `CatalogManager` that is not 
thread-safe.  



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

Reply via email to