yiguolei commented on code in PR #16940:
URL: https://github.com/apache/doris/pull/16940#discussion_r1113779623


##########
fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java:
##########
@@ -1158,6 +1181,41 @@ public TStreamLoadPutResult 
streamLoadPut(TStreamLoadPutRequest request) {
         return result;
     }
 
+    private void streamLoadPutWithSqlImpl(TStreamLoadPutRequest request) 
throws UserException {
+        String loadSql = request.getLoadSql();
+        ConnectContext ctx = new ConnectContext(null);
+        ctx.setEnv(Env.getCurrentEnv());
+        ctx.setQueryId(request.getLoadId());
+        ctx.setCluster(SystemInfoService.DEFAULT_CLUSTER);
+        ctx.setCurrentUserIdentity(UserIdentity.ROOT);
+        ctx.setQualifiedUser(UserIdentity.ROOT.getQualifiedUser());
+        ctx.setThreadLocalInfo();
+        ctx.setBackendId(request.getBackendId());
+        ctx.setLoadId(request.getLoadId());
+        SqlScanner input = new SqlScanner(new StringReader(loadSql), 
ctx.getSessionVariable().getSqlMode());
+        SqlParser parser = new SqlParser(input);
+        try {
+            StatementBase parsedStmt = SqlParserUtils.getFirstStmt(parser);

Review Comment:
   should not call coord.exec() in rpc thread context. It will use up all rpc 
threads.



-- 
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: commits-unsubscr...@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to