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

morrysnow 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 3d0ac87c1e0 [feature](mtmv) task tvf add queryId (#29671)
3d0ac87c1e0 is described below

commit 3d0ac87c1e08f59c88458586dcf6aceaf08d801a
Author: zhangdong <493738...@qq.com>
AuthorDate: Thu Jan 11 14:35:37 2024 +0800

    [feature](mtmv) task tvf add queryId (#29671)
    
    To better locate abnormal situations, add queryId
---
 .../main/java/org/apache/doris/job/extensions/mtmv/MTMVTask.java | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/job/extensions/mtmv/MTMVTask.java 
b/fe/fe-core/src/main/java/org/apache/doris/job/extensions/mtmv/MTMVTask.java
index cbfea9e7139..06adb3d70ed 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/job/extensions/mtmv/MTMVTask.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/job/extensions/mtmv/MTMVTask.java
@@ -29,6 +29,7 @@ import org.apache.doris.common.DdlException;
 import org.apache.doris.common.FeConstants;
 import org.apache.doris.common.MetaNotFoundException;
 import org.apache.doris.common.UserException;
+import org.apache.doris.common.util.DebugUtil;
 import org.apache.doris.common.util.TimeUtils;
 import org.apache.doris.job.exception.JobException;
 import org.apache.doris.job.task.AbstractTask;
@@ -88,7 +89,8 @@ public class MTMVTask extends AbstractTask {
             new Column("RefreshMode", ScalarType.createStringType()),
             new Column("NeedRefreshPartitions", ScalarType.createStringType()),
             new Column("CompletedPartitions", ScalarType.createStringType()),
-            new Column("Progress", ScalarType.createStringType()));
+            new Column("Progress", ScalarType.createStringType()),
+            new Column("LastQueryId", ScalarType.createStringType()));
 
     public static final ImmutableMap<String, Integer> COLUMN_TO_INDEX;
 
@@ -123,6 +125,8 @@ public class MTMVTask extends AbstractTask {
     List<String> completedPartitions;
     @SerializedName("refreshMode")
     MTMVTaskRefreshMode refreshMode;
+    @SerializedName("lastQueryId")
+    String lastQueryId;
 
     private MTMV mtmv;
     private MTMVRelation relation;
@@ -175,6 +179,7 @@ public class MTMVTask extends AbstractTask {
     private void exec(ConnectContext ctx, Set<Long> refreshPartitionIds, 
Map<OlapTable, String> tableWithPartKey)
             throws Exception {
         TUniqueId queryId = generateQueryId();
+        lastQueryId = DebugUtil.printId(queryId);
         // if SELF_MANAGE mv, only have default partition,  will not have 
partitionItem, so we give empty set
         UpdateMvByPartitionCommand command = UpdateMvByPartitionCommand
                 .from(mtmv, mtmv.getMvPartitionInfo().getPartitionType() == 
MTMVPartitionType.FOLLOW_BASE_TABLE
@@ -290,6 +295,8 @@ public class MTMVTask extends AbstractTask {
                                 completedPartitions)));
         trow.addToColumnValue(
                 new TCell().setStringVal(getProgress()));
+        trow.addToColumnValue(
+                new TCell().setStringVal(lastQueryId));
         return trow;
     }
 


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

Reply via email to