From 46659a2e9ee7e263e4f42965d0073fea4e0541be Mon Sep 17 00:00:00 2001 From: liugddx Date: Mon, 12 Feb 2024 10:50:27 +0800 Subject: [PATCH 1/2] 1 --- .../src/main/java/org/apache/doris/qe/StmtExecutor.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java b/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java index 5c89a5c05909347..a116ae5303d9801 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java @@ -127,6 +127,7 @@ import org.apache.doris.nereids.parser.NereidsParser; import org.apache.doris.nereids.rules.exploration.mv.InitMaterializationContextHook; import org.apache.doris.nereids.trees.plans.commands.BatchInsertIntoTableCommand; +import org.apache.doris.nereids.trees.plans.commands.ExportCommand; import org.apache.doris.nereids.trees.plans.commands.Command; import org.apache.doris.nereids.trees.plans.commands.CreateTableCommand; import org.apache.doris.nereids.trees.plans.commands.Forward; @@ -502,8 +503,12 @@ public void execute(TUniqueId queryId) throws Exception { } boolean isInsertIntoCommand = parsedStmt != null && parsedStmt instanceof LogicalPlanAdapter && ((LogicalPlanAdapter) parsedStmt).getLogicalPlan() instanceof InsertIntoTableCommand; + boolean isExportCommand = parsedStmt != null && parsedStmt instanceof LogicalPlanAdapter + && ((LogicalPlanAdapter) parsedStmt).getLogicalPlan() instanceof ExportCommand; + if (e instanceof NereidsException - && !context.getSessionVariable().enableFallbackToOriginalPlanner && !isInsertIntoCommand) { + && !context.getSessionVariable().enableFallbackToOriginalPlanner + && (!isInsertIntoCommand || !isExportCommand)) { LOG.warn("Analyze failed. {}", context.getQueryIdentifier(), e); throw ((NereidsException) e).getException(); } From add5272568e543bf6ae5fddc3f0f323256027ab9 Mon Sep 17 00:00:00 2001 From: liugddx Date: Mon, 12 Feb 2024 15:07:15 +0800 Subject: [PATCH 2/2] 1 --- fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java b/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java index a116ae5303d9801..90da411b80cc513 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java @@ -127,9 +127,9 @@ import org.apache.doris.nereids.parser.NereidsParser; import org.apache.doris.nereids.rules.exploration.mv.InitMaterializationContextHook; import org.apache.doris.nereids.trees.plans.commands.BatchInsertIntoTableCommand; -import org.apache.doris.nereids.trees.plans.commands.ExportCommand; import org.apache.doris.nereids.trees.plans.commands.Command; import org.apache.doris.nereids.trees.plans.commands.CreateTableCommand; +import org.apache.doris.nereids.trees.plans.commands.ExportCommand; import org.apache.doris.nereids.trees.plans.commands.Forward; import org.apache.doris.nereids.trees.plans.commands.InsertIntoTableCommand; import org.apache.doris.nereids.trees.plans.commands.InsertOverwriteTableCommand;