You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/11/24 02:29:06 UTC

[GitHub] [flink] fsk119 commented on a diff in pull request #21141: [FLINK-29742][sql-gateway] Support completing statement in SqlGatewayService.

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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org