You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "SaintBacchus (via GitHub)" <gi...@apache.org> on 2023/01/26 09:40:26 UTC

[GitHub] [doris] SaintBacchus commented on a diff in pull request #15511: [feature](Load)Suppot MySQL Load Data

SaintBacchus commented on code in PR #15511:
URL: https://github.com/apache/doris/pull/15511#discussion_r1087610231


##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -1836,6 +1841,41 @@ private void handleExplainStmt(String result) throws IOException {
         context.getState().setEof();
     }
 
+    private void handleLoadStmt() {
+        try {
+            LoadStmt loadStmt = (LoadStmt) parsedStmt;
+            EtlJobType jobType = loadStmt.getEtlJobType();
+            if (jobType == EtlJobType.UNKNOWN) {
+                throw new DdlException("Unknown load job type");
+            }
+            if (jobType == EtlJobType.HADOOP) {
+                throw new DdlException("Load job by hadoop cluster is disabled."
+                        + " Try using broker load. See 'help broker load;'");
+            }
+            LoadManager loadManager = context.getEnv().getLoadManager();
+            if (jobType == EtlJobType.LOCAL_FILE) {
+                if (!context.getCapability().isClientLocalFile()) {
+                    throw new DdlException("Doris server does not support load local file from mysql client.");

Review Comment:
   use a `1148` error code of these case



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

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


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