From f37cf9e52dd87ae944750576cd7b8a95c49511c0 Mon Sep 17 00:00:00 2001 From: starocean999 Date: Tue, 19 Nov 2024 11:22:43 +0800 Subject: [PATCH] [fix](nereids)should set isForwardedToMaster and redirectStatus to null before fallback to legacy planner (#44163) Problem Summary: when fallback to legacy planner, we need legacy planner to decide if the sql needs to be forwarded to master. But legacy planner doesn't work if isForwardedToMaster is already set to non-null value. So we should set isForwardedToMaster and redirectStatus to null before fallback --- fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java | 2 ++ 1 file changed, 2 insertions(+) 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 5b413ac9f016d0..3469350af2df23 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 @@ -624,6 +624,8 @@ public void execute(TUniqueId queryId) throws Exception { } parsedStmt = null; planner = null; + isForwardedToMaster = null; + redirectStatus = null; // Attention: currently exception from nereids does not mean an Exception to user terminal // unless user does not allow fallback to lagency planner. But state of query // has already been set to Error in this case, it will have some side effect on profile result