This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new fcb90dc808f [opt](Nereids) use enable_nereids_dml to control ctas and 
create table (#29284)
fcb90dc808f is described below

commit fcb90dc808f880a225aafe1a58ef5fd7227b31bb
Author: morrySnow <101034200+morrys...@users.noreply.github.com>
AuthorDate: Fri Dec 29 20:47:22 2023 +0800

    [opt](Nereids) use enable_nereids_dml to control ctas and create table 
(#29284)
---
 .../doris/nereids/trees/plans/commands/CreateTableCommand.java    | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/CreateTableCommand.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/CreateTableCommand.java
index 9bdbc949cba..4d1e3937162 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/CreateTableCommand.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/CreateTableCommand.java
@@ -73,6 +73,14 @@ public class CreateTableCommand extends Command implements 
ForwardWithSync {
 
     @Override
     public void run(ConnectContext ctx, StmtExecutor executor) throws 
Exception {
+        if (!ctx.getSessionVariable().isEnableNereidsDML()) {
+            try {
+                ctx.getSessionVariable().enableFallbackToOriginalPlannerOnce();
+            } catch (Exception e) {
+                throw new AnalysisException("failed to set fallback to 
original planner to true", e);
+            }
+            throw new AnalysisException("Nereids DML is disabled, will try to 
fall back to the original planner");
+        }
         if (!ctasQuery.isPresent()) {
             createTableInfo.validate(ctx);
             CreateTableStmt createTableStmt = 
createTableInfo.translateToLegacyStmt();


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

Reply via email to