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

cambyzju 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 5bb0c688d44 [fix](profile) task type not the same in observer and 
master (#39245)
5bb0c688d44 is described below

commit 5bb0c688d440f8b3c1f5031bac939b8baf1e15d6
Author: camby <camby...@tencent.com>
AuthorDate: Wed Aug 21 14:19:45 2024 +0800

    [fix](profile) task type not the same in observer and master (#39245)
---
 .../src/main/java/org/apache/doris/qe/StmtExecutor.java       | 11 +++++++++++
 1 file changed, 11 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 8a1a2f2a606..64b216052ab 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
@@ -714,6 +714,10 @@ public class StmtExecutor {
             if (logicalPlan instanceof Forward) {
                 redirectStatus = ((Forward) logicalPlan).toRedirectStatus();
                 if (isForwardToMaster()) {
+                    // before forward to master, we also need to set 
profileType in this node
+                    if (logicalPlan instanceof InsertIntoTableCommand) {
+                        profileType = ProfileType.LOAD;
+                    }
                     if (context.getCommand() == MysqlCommand.COM_STMT_PREPARE) 
{
                         throw new UserException("Forward master command is not 
supported for prepare statement");
                     }
@@ -956,6 +960,13 @@ public class StmtExecutor {
                 analyze(context.getSessionVariable().toThrift());
 
                 if (isForwardToMaster()) {
+                    // before forward to master, we also need to set 
profileType in this node
+                    if (parsedStmt instanceof InsertStmt) {
+                        InsertStmt insertStmt = (InsertStmt) parsedStmt;
+                        if (!insertStmt.getQueryStmt().isExplain()) {
+                            profileType = ProfileType.LOAD;
+                        }
+                    }
                     if (context.getCommand() == MysqlCommand.COM_STMT_PREPARE) 
{
                         throw new UserException("Forward master command is not 
supported for prepare statement");
                     }


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

Reply via email to