Repository: apache/doris
Pull request #49961: [enhance](mtmv)Exclude trigger table support db and catalog
Author: login: zddr
Labels: name: approved
description: Indicates a PR has been approved by one committer.
name: reviewed
name: dev/2.1.10-merged
name: dev/3.0.6-merged
Created: 2025-04-10T09:05:37Z | Merged: 2025-04-29T13:25:50Z

### What problem does this PR solve?

#### **Current Situation**
The user-configured `excluded_trigger_tables` is split by commas into a `Set<String> excludedTriggerTables`.  
During materialized view (MV) refresh checks, the system compares table snapshots. If `excludedTriggerTables.contains(tableName)` matches, the table is skipped for refresh.

#### **Problem**
The current logic cannot distinguish between tables with identical names under different catalogs or databases.

#### **Solution**
Change the configuration format to `[catalog_name.][db_name.]table_name`:
1. **No catalog/db prefix**: Behaves identically to the current implementation (matches any table with the same name).
2. **With catalog/db prefix**: Requires full match of `catalog_name.db_name.table_name` for exclusion.
3. **Backward compatibility**: Existing configurations (plain `table_name`) remain valid without metadata migration.

#### **Example**
**MV Definition:**
```sql
CREATE MV mv1 AS 
SELECT * FROM ctl1.db1.t1 
JOIN ctl1.db1.t2 
JOIN ctl1.db2.t1 
JOIN ctl2.db1.t1;
```

**Behavior by Configuration:**
1. `t1` → Skips: `ctl1.db1.t1`, `ctl1.db2.t1`, `ctl2.db1.t1`  
2. `db1.t1` → Skips: `ctl1.db1.t1`, `ctl2.db1.t1`  
3. `ctl1.db1.t1` → Skips only: `ctl1.db1.t1`  


Issue Number: close #xxx

Related PR: #xxx

Problem Summary:
Exclude trigger table support db and catalog
### Release note
Exclude trigger table support db and catalog

### Check List (For Author)

- Test <!-- At least one of them must be included. -->
    - [x] Regression test
    - [x] Unit Test
    - [ ] Manual test (add detailed scripts or steps below)
    - [ ] No need to test or manual test. Explain why:
        - [ ] This is a refactor/code format and no logic has been changed.
        - [ ] Previous test can cover this change.
        - [ ] No code files have been changed.
        - [ ] Other reason <!-- Add your reason?  -->

- Behavior changed:
    - [ ] No.
    - [x] Yes. <!-- Explain the behavior change -->

- Does this need documentation?
    - [ ] No.
    - [x] Yes. <!-- Add document PR link here. eg: https://github.com/apache/doris-website/pull/1214 -->

### Check List (For Reviewer who merge this PR)

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->




Diff:
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/TableName.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/TableName.java
index 81c96c9857d50f..210425d530417d 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/TableName.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/TableName.java
@@ -20,19 +20,23 @@
 
 package org.apache.doris.analysis;
 
+import org.apache.doris.catalog.DatabaseIf;
 import org.apache.doris.catalog.Env;
+import org.apache.doris.catalog.TableIf;
 import org.apache.doris.common.AnalysisException;
 import org.apache.doris.common.ErrorCode;
 import org.apache.doris.common.ErrorReport;
 import org.apache.doris.common.FeMetaVersion;
 import org.apache.doris.common.io.Text;
 import org.apache.doris.common.io.Writable;
+import org.apache.doris.datasource.CatalogIf;
 import org.apache.doris.datasource.InternalCatalog;
 import org.apache.doris.persist.gson.GsonUtils;
 
 import com.google.common.base.Preconditions;
 import com.google.common.base.Strings;
 import com.google.gson.annotations.SerializedName;
+import org.apache.commons.lang3.StringUtils;
 
 import java.io.DataInput;
 import java.io.DataOutput;
@@ -76,6 +80,27 @@ public TableName(String ctl, String db, String tbl) {
         this.tbl = tbl;
     }
 
+    public TableName(TableIf tableIf) throws AnalysisException {
+        String tableName = tableIf.getName();
+        if (StringUtils.isEmpty(tableName)) {
+            throw new AnalysisException("tableName is empty");
+        }
+        DatabaseIf db = tableIf.getDatabase();
+        if (db == null) {
+            throw new AnalysisException("db is null, tableName: " + tableName);
+        }
+        CatalogIf catalog = db.getCatalog();
+        if (catalog == null) {
+            throw new AnalysisException("catalog is null, dbName: " + db.getFullName());
+        }
+        if (Env.isStoredTableNamesLowerCase()) {
+            tableName = tableName.toLowerCase();
+        }
+        this.ctl = catalog.getName();
+        this.db = db.getFullName();
+        this.tbl = tableName;
+    }
+
     public void analyze(Analyzer analyzer) throws AnalysisException {
         if (Strings.isNullOrEmpty(ctl)) {
             ctl = analyzer.getDefaultCatalog();
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/MTMV.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/MTMV.java
index 716e00b10f2438..8b04bdd7f6ee79 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/MTMV.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/MTMV.java
@@ -18,6 +18,7 @@
 package org.apache.doris.catalog;
 
 import org.apache.doris.analysis.PartitionKeyDesc;
+import org.apache.doris.analysis.TableName;
 import org.apache.doris.catalog.OlapTableFactory.MTMVParams;
 import org.apache.doris.common.AnalysisException;
 import org.apache.doris.common.Config;
@@ -294,14 +295,18 @@ public int getRefreshPartitionNum() {
         }
     }
 
-    public Set<String> getExcludedTriggerTables() {
+    public Set<TableName> getExcludedTriggerTables() {
+        Set<TableName> res = Sets.newHashSet();
         readMvLock();
         try {
             if (StringUtils.isEmpty(mvProperties.get(PropertyAnalyzer.PROPERTIES_EXCLUDED_TRIGGER_TABLES))) {
-                return Sets.newHashSet();
+                return res;
             }
             String[] split = mvProperties.get(PropertyAnalyzer.PROPERTIES_EXCLUDED_TRIGGER_TABLES).split(",");
-            return Sets.newHashSet(split);
+            for (String alias : split) {
+                res.add(new TableName(alias));
+            }
+            return res;
         } finally {
             readMvUnlock();
         }
diff --git a/fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVPartitionUtil.java b/fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVPartitionUtil.java
index c3d7fabeda22b8..b8effc5a1f7c3c 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVPartitionUtil.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVPartitionUtil.java
@@ -22,6 +22,7 @@
 import org.apache.doris.analysis.DropPartitionClause;
 import org.apache.doris.analysis.PartitionKeyDesc;
 import org.apache.doris.analysis.SinglePartitionDesc;
+import org.apache.doris.analysis.TableName;
 import org.apache.doris.catalog.Column;
 import org.apache.doris.catalog.Database;
 import org.apache.doris.catalog.Env;
@@ -42,6 +43,7 @@
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
 import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 
@@ -84,14 +86,14 @@ public class MTMVPartitionUtil {
      */
     public static boolean isMTMVPartitionSync(MTMVRefreshContext refreshContext, String partitionName,
             Set<BaseTableInfo> tables,
-            Set<String> excludedTriggerTables) throws AnalysisException {
+            Set<TableName> excludedTriggerTables) throws AnalysisException {
         MTMV mtmv = refreshContext.getMtmv();
         Set<String> relatedPartitionNames = refreshContext.getPartitionMappings().get(partitionName);
         boolean isSyncWithPartition = true;
         if (mtmv.getMvPartitionInfo().getPartitionType() != MTMVPartitionType.SELF_MANAGE) {
             MTMVRelatedTableIf relatedTable = mtmv.getMvPartitionInfo().getRelatedTable();
             // if follow base table, not need compare with related table, only should compare with related partition
-            excludedTriggerTables.add(relatedTable.getName());
+            excludedTriggerTables.add(new TableName(relatedTable));
             if (CollectionUtils.isEmpty(relatedPartitionNames)) {
                 LOG.warn("can not found related partition, partitionId: {}, mtmvName: {}, relatedTableName: {}",
                         partitionName, mtmv.getName(), relatedTable.getName());
@@ -209,7 +211,8 @@ public static boolean isMTMVSync(MTMV mtmv) {
      * @return
      * @throws AnalysisException
      */
-    public static boolean isMTMVSync(MTMVRefreshContext context, Set<BaseTableInfo> tables, Set<String> excludeTables)
+    public static boolean isMTMVSync(MTMVRefreshContext context, Set<BaseTableInfo> tables,
+            Set<TableName> excludeTables)
             throws AnalysisException {
         MTMV mtmv = context.getMtmv();
         Set<String> partitionNames = mtmv.getPartitionNames();
@@ -406,7 +409,7 @@ private static void addPartition(MTMV mtmv, PartitionKeyDesc oldPartitionKeyDesc
      */
     private static boolean isSyncWithAllBaseTables(MTMVRefreshContext context, String mtmvPartitionName,
             Set<BaseTableInfo> tables,
-            Set<String> excludedTriggerTables) throws AnalysisException {
+            Set<TableName> excludedTriggerTables) throws AnalysisException {
         for (BaseTableInfo baseTableInfo : tables) {
             TableIf table = null;
             try {
@@ -415,7 +418,7 @@ private static boolean isSyncWithAllBaseTables(MTMVRefreshContext context, Strin
                 LOG.warn("get table failed, {}", baseTableInfo, e);
                 return false;
             }
-            if (excludedTriggerTables.contains(table.getName())) {
+            if (isTableExcluded(excludedTriggerTables, new TableName(table))) {
                 continue;
             }
             boolean syncWithBaseTable = isSyncWithBaseTable(context, mtmvPartitionName, baseTableInfo);
@@ -426,6 +429,44 @@ private static boolean isSyncWithAllBaseTables(MTMVRefreshContext context, Strin
         return true;
     }
 
+    public static boolean isTableExcluded(Set<TableName> excludedTriggerTables, TableName tableNameToCheck) {
+        for (TableName tableName : excludedTriggerTables) {
+            if (isTableNamelike(tableName, tableNameToCheck)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * if excludedTriggerTable.field is empty, we think they are like,otherwise they must equal to tableNameToCheck's
+     *
+     * @param excludedTriggerTable User-configured tables to excluded,
+     *         where dbName and ctlName are not mandatory fields and may therefore be empty.
+     * @param tableNameToCheck The table used to create an MTMV, must have non-empty tableName, dbName, and ctlName.
+     * @return
+     */
+    public static boolean isTableNamelike(TableName excludedTriggerTable, TableName tableNameToCheck) {
+        Objects.requireNonNull(excludedTriggerTable, "excludedTriggerTable can not be null");
+        Objects.requireNonNull(tableNameToCheck, "tableNameToCheck can not be null");
+
+        String excludedCtl = excludedTriggerTable.getCtl();
+        String excludedDb = excludedTriggerTable.getDb();
+        String excludedTbl = excludedTriggerTable.getTbl();
+        String checkCtl = tableNameToCheck.getCtl();
+        String checkDb = tableNameToCheck.getDb();
+        String checkTbl = tableNameToCheck.getTbl();
+
+        Objects.requireNonNull(excludedTbl, "excludedTbl can not be null");
+        Objects.requireNonNull(checkCtl, "checkCtl can not be null");
+        Objects.requireNonNull(checkDb, "checkDb can not be null");
+        Objects.requireNonNull(checkTbl, "checkTbl can not be null");
+
+        return (excludedTbl.equals(checkTbl))
+                && (StringUtils.isEmpty(excludedDb) || excludedDb.equals(checkDb))
+                && (StringUtils.isEmpty(excludedCtl) || excludedCtl.equals(checkCtl));
+    }
+
     private static boolean isSyncWithBaseTable(MTMVRefreshContext context, String mtmvPartitionName,
             BaseTableInfo baseTableInfo)
             throws AnalysisException {
diff --git a/fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVService.java b/fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVService.java
index 26c6bfb10e9876..2a9b1618df803d 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVService.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVService.java
@@ -17,6 +17,7 @@
 
 package org.apache.doris.mtmv;
 
+import org.apache.doris.analysis.TableName;
 import org.apache.doris.catalog.Env;
 import org.apache.doris.catalog.MTMV;
 import org.apache.doris.catalog.Table;
@@ -207,8 +208,16 @@ public void processEvent(Event event) throws EventException {
         }
     }
 
-    private boolean canRefresh(MTMV mtmv, TableIf table)   {
-        if (mtmv.getExcludedTriggerTables().contains(table.getName())) {
+    private boolean canRefresh(MTMV mtmv, TableIf table) {
+        TableName tableName = null;
+        try {
+            tableName = new TableName(table);
+        } catch (AnalysisException e) {
+            LOG.warn("skip refresh mtmv: {}, because get TableName failed: {}",
+                    mtmv.getName(), table.getName());
+            return false;
+        }
+        if (MTMVPartitionUtil.isTableExcluded(mtmv.getExcludedTriggerTables(), tableName)) {
             LOG.info("skip refresh mtmv: {}, because exclude trigger table: {}",
                     mtmv.getName(), table.getName());
             return false;
diff --git a/fe/fe-core/src/test/java/org/apache/doris/mtmv/MTMVPartitionUtilTest.java b/fe/fe-core/src/test/java/org/apache/doris/mtmv/MTMVPartitionUtilTest.java
index e5d2e21a8db626..c2e1777f796c33 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/mtmv/MTMVPartitionUtilTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/mtmv/MTMVPartitionUtilTest.java
@@ -19,10 +19,13 @@
 
 import org.apache.doris.analysis.PartitionKeyDesc;
 import org.apache.doris.analysis.PartitionValue;
+import org.apache.doris.analysis.TableName;
+import org.apache.doris.catalog.DatabaseIf;
 import org.apache.doris.catalog.MTMV;
 import org.apache.doris.catalog.OlapTable;
 import org.apache.doris.catalog.Partition;
 import org.apache.doris.common.AnalysisException;
+import org.apache.doris.datasource.CatalogIf;
 import org.apache.doris.mtmv.MTMVPartitionInfo.MTMVPartitionType;
 
 import com.google.common.collect.Lists;
@@ -52,6 +55,10 @@ public class MTMVPartitionUtilTest {
     @Mocked
     private OlapTable baseOlapTable;
     @Mocked
+    private DatabaseIf databaseIf;
+    @Mocked
+    private CatalogIf catalogIf;
+    @Mocked
     private MTMVSnapshotIf baseSnapshotIf;
     @Mocked
     private MTMVRefreshSnapshot refreshSnapshot;
@@ -144,6 +151,30 @@ public void setUp() throws NoSuchMethodException, SecurityException, AnalysisExc
                 refreshSnapshot.getSnapshotPartitions(anyString);
                 minTimes = 0;
                 result = Sets.newHashSet("name2");
+
+                baseOlapTable.getName();
+                minTimes = 0;
+                result = "t1";
+
+                baseOlapTable.getDatabase();
+                minTimes = 0;
+                result = databaseIf;
+
+                databaseIf.getFullName();
+                minTimes = 0;
+                result = "db1";
+
+                databaseIf.getCatalog();
+                minTimes = 0;
+                result = catalogIf;
+
+                databaseIf.getCatalog();
+                minTimes = 0;
+                result = catalogIf;
+
+                catalogIf.getName();
+                minTimes = 0;
+                result = "ctl1";
             }
         };
     }
@@ -218,4 +249,51 @@ public void testGeneratePartitionName() {
         String rangeName = MTMVPartitionUtil.generatePartitionName(rangeDesc);
         Assert.assertEquals("p_1_2", rangeName);
     }
+
+    @Test
+    public void testIsTableExcluded() {
+        Set<TableName> excludedTriggerTables = Sets.newHashSet(new TableName("table1"));
+        Assert.assertTrue(
+                MTMVPartitionUtil.isTableExcluded(excludedTriggerTables, new TableName("ctl1", "db1", "table1")));
+        Assert.assertTrue(
+                MTMVPartitionUtil.isTableExcluded(excludedTriggerTables, new TableName("ctl1", "db2", "table1")));
+        Assert.assertTrue(
+                MTMVPartitionUtil.isTableExcluded(excludedTriggerTables, new TableName("ctl2", "db1", "table1")));
+        Assert.assertFalse(
+                MTMVPartitionUtil.isTableExcluded(excludedTriggerTables, new TableName("ctl1", "db1", "table2")));
+
+        excludedTriggerTables = Sets.newHashSet(new TableName("db1.table1"));
+        Assert.assertTrue(
+                MTMVPartitionUtil.isTableExcluded(excludedTriggerTables, new TableName("ctl1", "db1", "table1")));
+        Assert.assertFalse(
+                MTMVPartitionUtil.isTableExcluded(excludedTriggerTables, new TableName("ctl1", "db2", "table1")));
+        Assert.assertTrue(
+                MTMVPartitionUtil.isTableExcluded(excludedTriggerTables, new TableName("ctl2", "db1", "table1")));
+        Assert.assertFalse(
+                MTMVPartitionUtil.isTableExcluded(excludedTriggerTables, new TableName("ctl1", "db1", "table2")));
+
+        excludedTriggerTables = Sets.newHashSet(new TableName("ctl1.db1.table1"));
+        Assert.assertTrue(
+                MTMVPartitionUtil.isTableExcluded(excludedTriggerTables, new TableName("ctl1", "db1", "table1")));
+        Assert.assertFalse(
+                MTMVPartitionUtil.isTableExcluded(excludedTriggerTables, new TableName("ctl1", "db2", "table1")));
+        Assert.assertFalse(
+                MTMVPartitionUtil.isTableExcluded(excludedTriggerTables, new TableName("ctl2", "db1", "table1")));
+        Assert.assertFalse(
+                MTMVPartitionUtil.isTableExcluded(excludedTriggerTables, new TableName("ctl1", "db1", "table2")));
+    }
+
+    @Test
+    public void testIsTableNamelike() {
+        TableName tableNameToCheck = new TableName("ctl1", "db1", "table1");
+        Assert.assertTrue(MTMVPartitionUtil.isTableNamelike(new TableName("table1"), tableNameToCheck));
+        Assert.assertTrue(MTMVPartitionUtil.isTableNamelike(new TableName("db1.table1"), tableNameToCheck));
+        Assert.assertTrue(MTMVPartitionUtil.isTableNamelike(new TableName("ctl1.db1.table1"), tableNameToCheck));
+        Assert.assertFalse(MTMVPartitionUtil.isTableNamelike(new TableName("ctl1.table1"), tableNameToCheck));
+        Assert.assertFalse(MTMVPartitionUtil.isTableNamelike(new TableName("ctl1.db2.table1"), tableNameToCheck));
+        Assert.assertFalse(MTMVPartitionUtil.isTableNamelike(new TableName("ctl1.db1.table2"), tableNameToCheck));
+        Assert.assertFalse(MTMVPartitionUtil.isTableNamelike(new TableName("ctl2.db1.table1"), tableNameToCheck));
+        Assert.assertFalse(MTMVPartitionUtil.isTableNamelike(new TableName("db1"), tableNameToCheck));
+        Assert.assertFalse(MTMVPartitionUtil.isTableNamelike(new TableName("ctl1"), tableNameToCheck));
+    }
 }
diff --git a/fe/fe-core/src/test/java/org/apache/doris/mtmv/MTMVRewriteUtilTest.java b/fe/fe-core/src/test/java/org/apache/doris/mtmv/MTMVRewriteUtilTest.java
index c2e402adb82ab8..25ad6b05dd8454 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/mtmv/MTMVRewriteUtilTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/mtmv/MTMVRewriteUtilTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.doris.mtmv;
 
+import org.apache.doris.analysis.TableName;
 import org.apache.doris.catalog.MTMV;
 import org.apache.doris.catalog.Partition;
 import org.apache.doris.common.AnalysisException;
@@ -105,7 +106,7 @@ public void setUp() throws NoSuchMethodException, SecurityException, AnalysisExc
 
                 MTMVPartitionUtil.isMTMVPartitionSync((MTMVRefreshContext) any, anyString,
                         (Set<BaseTableInfo>) any,
-                        (Set<String>) any);
+                        (Set<TableName>) any);
                 minTimes = 0;
                 result = true;
 
@@ -126,7 +127,7 @@ public void testGetMTMVCanRewritePartitionsForceConsistent() throws AnalysisExce
 
                 MTMVPartitionUtil.isMTMVPartitionSync((MTMVRefreshContext) any, anyString,
                         (Set<BaseTableInfo>) any,
-                        (Set<String>) any);
+                        (Set<TableName>) any);
                 minTimes = 0;
                 result = false;
             }
@@ -156,7 +157,7 @@ public void testGetMTMVCanRewritePartitionsInGracePeriod() throws AnalysisExcept
 
                 MTMVPartitionUtil.isMTMVPartitionSync((MTMVRefreshContext) any, anyString,
                         (Set<BaseTableInfo>) any,
-                        (Set<String>) any);
+                        (Set<TableName>) any);
                 minTimes = 0;
                 result = false;
             }
@@ -177,7 +178,7 @@ public void testGetMTMVCanRewritePartitionsNotInGracePeriod() throws AnalysisExc
 
                 MTMVPartitionUtil.isMTMVPartitionSync((MTMVRefreshContext) any, anyString,
                         (Set<BaseTableInfo>) any,
-                        (Set<String>) any);
+                        (Set<TableName>) any);
                 minTimes = 0;
                 result = false;
             }
@@ -210,7 +211,7 @@ public void testGetMTMVCanRewritePartitionsNotSync() throws AnalysisException {
             {
                 MTMVPartitionUtil.isMTMVPartitionSync((MTMVRefreshContext) any, anyString,
                         (Set<BaseTableInfo>) any,
-                        (Set<String>) any);
+                        (Set<TableName>) any);
                 minTimes = 0;
                 result = false;
             }
diff --git a/fe/fe-core/src/test/java/org/apache/doris/mtmv/MTMVTaskTest.java b/fe/fe-core/src/test/java/org/apache/doris/mtmv/MTMVTaskTest.java
index 0bcd2f0569097d..da9315d8ebc576 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/mtmv/MTMVTaskTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/mtmv/MTMVTaskTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.doris.mtmv;
 
+import org.apache.doris.analysis.TableName;
 import org.apache.doris.catalog.MTMV;
 import org.apache.doris.common.AnalysisException;
 import org.apache.doris.common.DdlException;
@@ -82,7 +83,7 @@ public void setUp()
                 // minTimes = 0;
                 // result = poneId;
 
-                mtmvPartitionUtil.isMTMVSync((MTMVRefreshContext) any, (Set<BaseTableInfo>) any, (Set<String>) any);
+                mtmvPartitionUtil.isMTMVSync((MTMVRefreshContext) any, (Set<BaseTableInfo>) any, (Set<TableName>) any);
                 minTimes = 0;
                 result = true;
 
@@ -140,7 +141,7 @@ public void testCalculateNeedRefreshPartitionsSystemComplete() throws AnalysisEx
     public void testCalculateNeedRefreshPartitionsSystemNotSyncComplete() throws AnalysisException {
         new Expectations() {
             {
-                mtmvPartitionUtil.isMTMVSync((MTMVRefreshContext) any, (Set<BaseTableInfo>) any, (Set<String>) any);
+                mtmvPartitionUtil.isMTMVSync((MTMVRefreshContext) any, (Set<BaseTableInfo>) any, (Set<TableName>) any);
                 minTimes = 0;
                 result = false;
             }
@@ -156,7 +157,7 @@ public void testCalculateNeedRefreshPartitionsSystemNotSyncAuto() throws Analysi
         new Expectations() {
             {
                 mtmvPartitionUtil
-                        .isMTMVSync((MTMVRefreshContext) any, (Set<BaseTableInfo>) any, (Set<String>) any);
+                        .isMTMVSync((MTMVRefreshContext) any, (Set<BaseTableInfo>) any, (Set<TableName>) any);
                 minTimes = 0;
                 result = false;
 
diff --git a/fe/fe-core/src/test/java/org/apache/doris/mtmv/MTMVTest.java b/fe/fe-core/src/test/java/org/apache/doris/mtmv/MTMVTest.java
index de52b721287f61..cfe2ac9cb6f0d0 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/mtmv/MTMVTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/mtmv/MTMVTest.java
@@ -19,6 +19,7 @@
 
 import org.apache.doris.analysis.PartitionKeyDesc;
 import org.apache.doris.analysis.PartitionValue;
+import org.apache.doris.analysis.TableName;
 import org.apache.doris.catalog.Column;
 import org.apache.doris.catalog.MTMV;
 import org.apache.doris.catalog.PartitionItem;
@@ -27,6 +28,7 @@
 import org.apache.doris.catalog.RangePartitionItem;
 import org.apache.doris.catalog.ScalarType;
 import org.apache.doris.common.AnalysisException;
+import org.apache.doris.common.util.PropertyAnalyzer;
 import org.apache.doris.job.common.IntervalUnit;
 import org.apache.doris.job.extensions.mtmv.MTMVTask;
 import org.apache.doris.mtmv.MTMVRefreshEnum.BuildMode;
@@ -142,4 +144,33 @@ private Map<String, PartitionItem> mockMvPartitionItems() throws AnalysisExcepti
         res.put("mvp1", item1);
         return res;
     }
+
+    @Test
+    public void testGetExcludedTriggerTables() {
+        Map<String, String> mvProperties = Maps.newHashMap();
+        MTMV mtmv = new MTMV();
+        mtmv.setMvProperties(mvProperties);
+
+        mvProperties.put(PropertyAnalyzer.PROPERTIES_EXCLUDED_TRIGGER_TABLES, "t1");
+        Set<TableName> excludedTriggerTables = mtmv.getExcludedTriggerTables();
+        Assert.assertEquals(1, excludedTriggerTables.size());
+        Assert.assertTrue(excludedTriggerTables.contains(new TableName(null, null, "t1")));
+
+        mvProperties.put(PropertyAnalyzer.PROPERTIES_EXCLUDED_TRIGGER_TABLES, "db1.t1");
+        excludedTriggerTables = mtmv.getExcludedTriggerTables();
+        Assert.assertEquals(1, excludedTriggerTables.size());
+        Assert.assertTrue(excludedTriggerTables.contains(new TableName(null, "db1", "t1")));
+
+        mvProperties.put(PropertyAnalyzer.PROPERTIES_EXCLUDED_TRIGGER_TABLES, "ctl1.db1.t1");
+        excludedTriggerTables = mtmv.getExcludedTriggerTables();
+        Assert.assertEquals(1, excludedTriggerTables.size());
+        Assert.assertTrue(excludedTriggerTables.contains(new TableName("ctl1", "db1", "t1")));
+
+        mvProperties.put(PropertyAnalyzer.PROPERTIES_EXCLUDED_TRIGGER_TABLES, "ctl1.db1.t1,db2.t2,t3");
+        excludedTriggerTables = mtmv.getExcludedTriggerTables();
+        Assert.assertEquals(3, excludedTriggerTables.size());
+        Assert.assertTrue(excludedTriggerTables.contains(new TableName("ctl1", "db1", "t1")));
+        Assert.assertTrue(excludedTriggerTables.contains(new TableName(null, "db2", "t2")));
+        Assert.assertTrue(excludedTriggerTables.contains(new TableName(null, null, "t3")));
+    }
 }
diff --git a/regression-test/data/mtmv_p0/test_excluded_trigger_table_mtmv.out b/regression-test/data/mtmv_p0/test_excluded_trigger_table_mtmv.out
new file mode 100644
index 00000000000000..4a2ede2fe66396
--- /dev/null
+++ b/regression-test/data/mtmv_p0/test_excluded_trigger_table_mtmv.out
@@ -0,0 +1,37 @@
+-- This file is automatically generated. You should know what you did if you want to edit this
+-- !init --
+1	1
+
+-- !true_table --
+1	1
+
+-- !true_db_table --
+1	1
+
+-- !true_ctl_db_table --
+1	1
+
+-- !false_ctl_db_table --
+1	1
+2	2
+3	3
+4	4
+5	5
+
+-- !false_db_table --
+1	1
+2	2
+3	3
+4	4
+5	5
+6	6
+
+-- !false_table --
+1	1
+2	2
+3	3
+4	4
+5	5
+6	6
+7	7
+
diff --git a/regression-test/suites/mtmv_p0/test_excluded_trigger_table_mtmv.groovy b/regression-test/suites/mtmv_p0/test_excluded_trigger_table_mtmv.groovy
new file mode 100644
index 00000000000000..6a2264be699dda
--- /dev/null
+++ b/regression-test/suites/mtmv_p0/test_excluded_trigger_table_mtmv.groovy
@@ -0,0 +1,135 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+import org.junit.Assert;
+
+suite("test_excluded_trigger_table_mtmv","mtmv") {
+    String suiteName = "test_excluded_trigger_table_mtmv"
+    String dbName = context.config.getDbNameByFile(context.file)
+    String tableName = "${suiteName}_table"
+    String mvName = "${suiteName}_mv"
+    sql """drop table if exists `${tableName}`"""
+    sql """drop materialized view if exists ${mvName};"""
+
+    sql """
+        CREATE TABLE ${tableName}
+        (
+            k2 TINYINT,
+            k3 INT not null
+        )
+        DISTRIBUTED BY HASH(k2) BUCKETS 2
+        PROPERTIES (
+            "replication_num" = "1"
+        );
+        """
+    sql """
+        CREATE MATERIALIZED VIEW ${mvName}
+        BUILD DEFERRED REFRESH AUTO ON MANUAL
+        DISTRIBUTED BY RANDOM BUCKETS 2
+        PROPERTIES (
+        'replication_num' = '1'
+        )
+        AS
+        SELECT * from ${tableName};
+        """
+
+    sql """
+        insert into ${tableName} values(1,1);
+        """
+     sql """
+        REFRESH MATERIALIZED VIEW ${mvName} AUTO
+        """
+    waitingMTMVTaskFinishedByMvName(mvName)
+    order_qt_init "SELECT * FROM ${mvName}"
+    sql """
+        insert into ${tableName} values(2,2);
+        """
+    sql """
+            alter Materialized View ${mvName} set("excluded_trigger_tables"="${tableName}");
+        """
+    sql """
+        REFRESH MATERIALIZED VIEW ${mvName} AUTO
+        """
+    waitingMTMVTaskFinishedByMvName(mvName)
+    // should not refresh
+    order_qt_true_table "SELECT * FROM ${mvName}"
+
+    sql """
+            insert into ${tableName} values(3,3);
+            """
+    sql """
+            alter Materialized View ${mvName} set("excluded_trigger_tables"="${dbName}.${tableName}");
+        """
+     sql """
+         REFRESH MATERIALIZED VIEW ${mvName} AUTO
+         """
+    waitingMTMVTaskFinishedByMvName(mvName)
+     // should not refresh
+    order_qt_true_db_table "SELECT * FROM ${mvName}"
+
+    sql """
+            insert into ${tableName} values(4,4);
+            """
+    sql """
+            alter Materialized View ${mvName} set("excluded_trigger_tables"="internal.${dbName}.${tableName}");
+        """
+     sql """
+         REFRESH MATERIALIZED VIEW ${mvName} AUTO
+         """
+    waitingMTMVTaskFinishedByMvName(mvName)
+     // should not refresh
+    order_qt_true_ctl_db_table "SELECT * FROM ${mvName}"
+
+    sql """
+            insert into ${tableName} values(5,5);
+            """
+    sql """
+            alter Materialized View ${mvName} set("excluded_trigger_tables"="internal1.${dbName}.${tableName}");
+        """
+     sql """
+         REFRESH MATERIALIZED VIEW ${mvName} AUTO
+         """
+    waitingMTMVTaskFinishedByMvName(mvName)
+     // should refresh
+    order_qt_false_ctl_db_table "SELECT * FROM ${mvName}"
+
+     sql """
+            insert into ${tableName} values(6,6);
+            """
+    sql """
+            alter Materialized View ${mvName} set("excluded_trigger_tables"="${dbName}1.${tableName}");
+        """
+     sql """
+         REFRESH MATERIALIZED VIEW ${mvName} AUTO
+         """
+    waitingMTMVTaskFinishedByMvName(mvName)
+     // should refresh
+    order_qt_false_db_table "SELECT * FROM ${mvName}"
+
+    sql """
+            insert into ${tableName} values(7,7);
+            """
+    sql """
+            alter Materialized View ${mvName} set("excluded_trigger_tables"="${tableName}1");
+        """
+     sql """
+         REFRESH MATERIALIZED VIEW ${mvName} AUTO
+         """
+    waitingMTMVTaskFinishedByMvName(mvName)
+     // should refresh
+    order_qt_false_table "SELECT * FROM ${mvName}"
+}


Reviews:
user: login: seawinde
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-11T06:24:45Z
user: login: zddr
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-11T06:33:58Z
user: login: morrySnow
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-22T10:13:06Z
user: login: morrySnow
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-28T05:04:45Z
user: login: seawinde
state: APPROVED
author_association: MEMBER
submitted_at: 2025-04-28T08:19:17Z

Review comments:
diff_hunk: @@ -189,6 +205,18 @@ public String toSql() {
         return stringBuilder.toString();
     }
 
+    /**
+     * if this.field is empty, we think they are like,otherwise they must equal to other's
+     *
+     * @param other
+     * @return
+     */
+    public boolean like(TableName other) {
+        return (StringUtils.isEmpty(tbl) || tbl.equals(other.tbl))
path: fe/fe-core/src/main/java/org/apache/doris/analysis/TableName.java
user: login: seawinde
body: what would happen when other.tbl is null
should return true or false?
created_at: 2025-04-11T06:24:45Z
author_association: MEMBER
diff_hunk: @@ -189,6 +205,18 @@ public String toSql() {
         return stringBuilder.toString();
     }
 
+    /**
+     * if this.field is empty, we think they are like,otherwise they must equal to other's
+     *
+     * @param other
+     * @return
+     */
+    public boolean like(TableName other) {
+        return (StringUtils.isEmpty(tbl) || tbl.equals(other.tbl))
path: fe/fe-core/src/main/java/org/apache/doris/analysis/TableName.java
user: login: zddr
body: other must have tbl,If an accident occurs, return false

created_at: 2025-04-11T06:33:58Z
author_association: CONTRIBUTOR
diff_hunk: @@ -76,6 +80,18 @@ public TableName(String ctl, String db, String tbl) {
         this.tbl = tbl;
     }
 
+    public TableName(TableIf tableIf) {
+        String tableName = tableIf.getName();
+        DatabaseIf db = tableIf.getDatabase();
path: fe/fe-core/src/main/java/org/apache/doris/analysis/TableName.java
user: login: morrySnow
body: could return null, so should `check == null`
created_at: 2025-04-22T10:03:43Z
author_association: CONTRIBUTOR
diff_hunk: @@ -76,6 +80,18 @@ public TableName(String ctl, String db, String tbl) {
         this.tbl = tbl;
     }
 
+    public TableName(TableIf tableIf) {
+        String tableName = tableIf.getName();
+        DatabaseIf db = tableIf.getDatabase();
+        CatalogIf catalog = db.getCatalog();
path: fe/fe-core/src/main/java/org/apache/doris/analysis/TableName.java
user: login: morrySnow
body: check null
created_at: 2025-04-22T10:04:29Z
author_association: CONTRIBUTOR
diff_hunk: @@ -76,6 +80,18 @@ public TableName(String ctl, String db, String tbl) {
         this.tbl = tbl;
     }
 
+    public TableName(TableIf tableIf) {
+        String tableName = tableIf.getName();
+        DatabaseIf db = tableIf.getDatabase();
+        CatalogIf catalog = db.getCatalog();
+        if (Env.isStoredTableNamesLowerCase()) {
+            tableName = tableName.toLowerCase();
path: fe/fe-core/src/main/java/org/apache/doris/analysis/TableName.java
user: login: morrySnow
body: check null
created_at: 2025-04-22T10:04:38Z
author_association: CONTRIBUTOR
diff_hunk: @@ -189,6 +205,18 @@ public String toSql() {
         return stringBuilder.toString();
     }
 
+    /**
+     * if this.field is empty, we think they are like,otherwise they must equal to other's
+     *
+     * @param other
+     * @return
+     */
+    public boolean like(TableName other) {
path: fe/fe-core/src/main/java/org/apache/doris/analysis/TableName.java
user: login: morrySnow
body: check other == null
created_at: 2025-04-22T10:05:29Z
author_association: CONTRIBUTOR
diff_hunk: @@ -189,6 +205,18 @@ public String toSql() {
         return stringBuilder.toString();
     }
 
+    /**
+     * if this.field is empty, we think they are like,otherwise they must equal to other's
+     *
+     * @param other
+     * @return
+     */
+    public boolean like(TableName other) {
path: fe/fe-core/src/main/java/org/apache/doris/analysis/TableName.java
user: login: morrySnow
body: should explain the like does not conform to the commutative law. and notice user that if want to get expected result which TableName should be parameter
created_at: 2025-04-22T10:09:45Z
author_association: CONTRIBUTOR
diff_hunk: @@ -426,6 +428,15 @@ private static boolean isSyncWithAllBaseTables(MTMVRefreshContext context, Strin
         return true;
     }
 
+    public static boolean isTableExcluded(Set<TableName> excludedTriggerTables, TableName tableNameToCheck) {
+        for (TableName tableName : excludedTriggerTables) {
+            if (tableName.like(tableNameToCheck)) {
path: fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVPartitionUtil.java
user: login: morrySnow
body: maybe like is not appropriate impl in TableName, it is better to impl in this Util class, because we could not use it in other places
created_at: 2025-04-22T10:12:23Z
author_association: CONTRIBUTOR

PR comments:
user: login: hello-stephen
created_at: 2025-04-10T09:05:43Z
body: 
Thank you for your contribution to Apache Doris.
Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/How+to+process+your+PR).

Please clearly describe your PR:
1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
3. What features were added. Why was this function added?
4. Which code was refactored and why was this part of the code refactored?
5. Which functions were optimized and what is the difference before and after the optimization?
    
author_association: CONTRIBUTOR
user: login: zddr
created_at: 2025-04-10T09:07:01Z
body: run buildall
author_association: CONTRIBUTOR
user: login: doris-robot
created_at: 2025-04-10T09:26:20Z
body: 
<details>
<summary>TPC-H: <b>Total hot run time: 34293 ms</b></summary>

```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 98e9fd91719e0e8e6306cb47a08e223fee956795, data reload: false

------ Round 1 ----------------------------------
q1	26275	5086	5029	5029
q2	2065	270	181	181
q3	10640	1242	719	719
q4	10245	1003	540	540
q5	8089	2410	2364	2364
q6	192	163	132	132
q7	915	744	621	621
q8	9328	1305	1130	1130
q9	6869	5105	5116	5105
q10	6815	2330	1883	1883
q11	504	287	274	274
q12	357	365	226	226
q13	17764	3688	3089	3089
q14	237	233	204	204
q15	526	491	471	471
q16	622	608	585	585
q17	624	868	388	388
q18	7701	7165	7092	7092
q19	1229	955	550	550
q20	349	338	228	228
q21	4524	3467	2530	2530
q22	1047	1008	952	952
Total cold run time: 116917 ms
Total hot run time: 34293 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5330	5116	5130	5116
q2	248	325	226	226
q3	2161	2673	2309	2309
q4	1474	1914	1477	1477
q5	4583	4419	4380	4380
q6	213	179	126	126
q7	2022	1872	1739	1739
q8	2634	2515	2590	2515
q9	7360	7263	7104	7104
q10	2968	3201	2758	2758
q11	566	495	489	489
q12	705	769	620	620
q13	3504	3976	3290	3290
q14	285	291	261	261
q15	524	474	468	468
q16	646	700	636	636
q17	1164	1548	1414	1414
q18	7745	7588	7461	7461
q19	820	824	826	824
q20	1975	1983	1807	1807
q21	5145	4704	4614	4614
q22	1078	1017	960	960
Total cold run time: 53150 ms
Total hot run time: 50594 ms
```
</details>

author_association: NONE
user: login: doris-robot
created_at: 2025-04-10T09:38:05Z
body: 
<details>
<summary>TPC-DS: <b>Total hot run time: 188902 ms</b></summary>

```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 98e9fd91719e0e8e6306cb47a08e223fee956795, data reload: false

query1	1012	485	487	485
query2	6539	1996	1939	1939
query3	6754	219	215	215
query4	26409	24103	23785	23785
query5	4330	656	494	494
query6	310	208	207	207
query7	4616	536	282	282
query8	292	244	245	244
query9	8627	2581	2568	2568
query10	490	319	264	264
query11	15598	15237	14955	14955
query12	162	116	115	115
query13	1661	548	397	397
query14	9058	6749	6778	6749
query15	217	198	180	180
query16	7311	659	467	467
query17	1221	771	597	597
query18	1985	417	323	323
query19	206	201	175	175
query20	126	127	121	121
query21	211	135	111	111
query22	4423	4220	4151	4151
query23	34481	33035	33084	33035
query24	8582	2478	2478	2478
query25	546	475	414	414
query26	1237	283	153	153
query27	2724	528	337	337
query28	4324	2430	2383	2383
query29	780	586	441	441
query30	298	236	202	202
query31	944	949	768	768
query32	72	73	65	65
query33	560	402	347	347
query34	808	928	545	545
query35	840	844	753	753
query36	1019	1069	912	912
query37	128	108	78	78
query38	4253	4289	4038	4038
query39	1492	1406	1436	1406
query40	213	129	108	108
query41	58	57	54	54
query42	125	105	109	105
query43	521	532	488	488
query44	1345	810	805	805
query45	190	181	180	180
query46	910	1100	614	614
query47	1783	1829	1731	1731
query48	387	421	308	308
query49	766	534	430	430
query50	692	708	407	407
query51	4386	4324	4189	4189
query52	118	106	104	104
query53	234	262	186	186
query54	588	574	512	512
query55	85	81	83	81
query56	307	330	290	290
query57	1177	1202	1083	1083
query58	273	261	286	261
query59	2752	2706	2603	2603
query60	333	324	338	324
query61	131	142	130	130
query62	861	786	683	683
query63	229	193	191	191
query64	4362	1023	695	695
query65	4469	4301	4400	4301
query66	1152	457	329	329
query67	15772	15618	15221	15221
query68	8198	917	516	516
query69	481	318	285	285
query70	1254	1137	1125	1125
query71	476	332	294	294
query72	5619	4735	4720	4720
query73	715	599	344	344
query74	9155	9069	8893	8893
query75	3988	3366	2808	2808
query76	3751	1361	825	825
query77	787	397	294	294
query78	10161	10322	9369	9369
query79	2130	876	582	582
query80	626	545	446	446
query81	488	276	230	230
query82	477	135	105	105
query83	269	263	252	252
query84	246	114	87	87
query85	868	365	314	314
query86	387	315	291	291
query87	4511	4628	4424	4424
query88	3657	2288	2266	2266
query89	421	346	302	302
query90	1843	223	224	223
query91	164	148	111	111
query92	75	64	58	58
query93	1631	983	582	582
query94	678	425	323	323
query95	379	302	296	296
query96	498	620	286	286
query97	3254	3321	3152	3152
query98	240	222	205	205
query99	1539	1502	1302	1302
Total cold run time: 277831 ms
Total hot run time: 188902 ms
```
</details>

author_association: NONE
user: login: doris-robot
created_at: 2025-04-10T09:43:24Z
body: 
<details>
<summary>ClickBench: <b>Total hot run time: 31.33 s</b></summary>

```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 98e9fd91719e0e8e6306cb47a08e223fee956795, data reload: false

query1	0.04	0.04	0.03
query2	0.12	0.10	0.10
query3	0.25	0.20	0.20
query4	1.59	0.20	0.20
query5	0.61	0.58	0.59
query6	1.18	0.71	0.70
query7	0.03	0.02	0.01
query8	0.04	0.04	0.03
query9	0.59	0.53	0.51
query10	0.58	0.58	0.56
query11	0.15	0.11	0.10
query12	0.15	0.11	0.11
query13	0.61	0.60	0.60
query14	2.70	2.69	2.70
query15	0.93	0.85	0.85
query16	0.38	0.40	0.40
query17	1.00	1.04	1.04
query18	0.20	0.19	0.20
query19	1.92	1.87	1.89
query20	0.01	0.01	0.02
query21	15.37	0.92	0.55
query22	0.74	1.10	0.64
query23	15.05	1.37	0.59
query24	6.47	1.85	1.13
query25	0.51	0.30	0.06
query26	0.55	0.16	0.12
query27	0.06	0.05	0.04
query28	10.62	0.86	0.42
query29	12.60	3.95	3.31
query30	0.25	0.09	0.06
query31	2.80	0.58	0.39
query32	3.24	0.55	0.46
query33	3.04	3.02	3.18
query34	15.82	5.10	4.47
query35	4.53	4.49	4.51
query36	0.67	0.49	0.48
query37	0.08	0.06	0.06
query38	0.05	0.04	0.04
query39	0.03	0.02	0.02
query40	0.17	0.14	0.13
query41	0.08	0.03	0.03
query42	0.04	0.03	0.02
query43	0.04	0.03	0.02
Total cold run time: 105.89 s
Total hot run time: 31.33 s
```
</details>

author_association: NONE
user: login: zddr
created_at: 2025-04-23T12:13:36Z
body: run buildall
author_association: CONTRIBUTOR
user: login: doris-robot
created_at: 2025-04-23T12:36:51Z
body: 
<details>
<summary>TPC-H: <b>Total hot run time: 33904 ms</b></summary>

```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 629b96b80a4bf5853f383b827b09e07f5556d121, data reload: false

------ Round 1 ----------------------------------
q1	26339	5042	5029	5029
q2	2072	293	179	179
q3	10389	1263	703	703
q4	10228	1016	539	539
q5	7502	2351	2344	2344
q6	181	163	133	133
q7	923	759	628	628
q8	9338	1314	1168	1168
q9	6916	5184	5068	5068
q10	6801	2288	1874	1874
q11	476	284	278	278
q12	342	358	217	217
q13	17754	3631	3074	3074
q14	223	236	212	212
q15	530	484	475	475
q16	451	445	400	400
q17	580	855	368	368
q18	7598	7245	7023	7023
q19	1229	951	564	564
q20	339	345	221	221
q21	3964	3285	2443	2443
q22	1030	1032	964	964
Total cold run time: 115205 ms
Total hot run time: 33904 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5136	5105	5061	5061
q2	236	328	225	225
q3	2177	2660	2335	2335
q4	1435	1797	1381	1381
q5	4560	4464	4385	4385
q6	258	163	126	126
q7	1968	1912	1753	1753
q8	2616	2674	2562	2562
q9	7178	7131	7151	7131
q10	2981	3167	2718	2718
q11	580	531	498	498
q12	655	761	609	609
q13	3522	3833	3268	3268
q14	272	285	266	266
q15	517	482	472	472
q16	479	504	453	453
q17	1179	1436	1386	1386
q18	7703	7396	7420	7396
q19	840	808	845	808
q20	1956	2000	1867	1867
q21	5206	4751	4559	4559
q22	1036	1016	983	983
Total cold run time: 52490 ms
Total hot run time: 50242 ms
```
</details>

author_association: NONE
user: login: doris-robot
created_at: 2025-04-23T12:48:19Z
body: 
<details>
<summary>TPC-DS: <b>Total hot run time: 184768 ms</b></summary>

```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 629b96b80a4bf5853f383b827b09e07f5556d121, data reload: false

query1	1002	489	515	489
query2	6575	1792	1818	1792
query3	6752	223	214	214
query4	26254	23462	22905	22905
query5	4333	612	473	473
query6	304	203	189	189
query7	4618	486	280	280
query8	292	254	242	242
query9	8636	2571	2582	2571
query10	469	331	271	271
query11	15476	15106	14763	14763
query12	169	109	117	109
query13	1676	526	415	415
query14	8837	6329	6289	6289
query15	209	193	173	173
query16	7130	621	453	453
query17	933	750	580	580
query18	2003	397	314	314
query19	198	192	159	159
query20	121	116	118	116
query21	213	126	108	108
query22	4035	4112	4006	4006
query23	33868	33007	33094	33007
query24	8437	2398	2379	2379
query25	542	469	383	383
query26	1238	266	150	150
query27	2751	509	330	330
query28	4329	2090	2075	2075
query29	772	538	440	440
query30	281	220	186	186
query31	923	864	747	747
query32	79	66	62	62
query33	569	377	314	314
query34	787	840	532	532
query35	777	811	741	741
query36	939	987	884	884
query37	114	104	77	77
query38	4085	4259	4050	4050
query39	1429	1395	1557	1395
query40	210	123	112	112
query41	58	55	54	54
query42	116	115	107	107
query43	491	504	467	467
query44	1314	788	809	788
query45	186	172	168	168
query46	876	1023	626	626
query47	1752	1772	1694	1694
query48	371	414	300	300
query49	757	491	411	411
query50	662	705	398	398
query51	4092	4191	4100	4100
query52	108	107	103	103
query53	234	261	191	191
query54	572	572	495	495
query55	82	80	81	80
query56	303	305	279	279
query57	1120	1168	1065	1065
query58	263	258	258	258
query59	2495	2611	2476	2476
query60	327	315	304	304
query61	133	128	130	128
query62	794	732	657	657
query63	239	184	189	184
query64	4367	1079	663	663
query65	4345	4269	4226	4226
query66	1146	425	311	311
query67	15650	15606	15048	15048
query68	8330	896	517	517
query69	471	312	262	262
query70	1172	1070	1071	1070
query71	454	319	302	302
query72	5640	4760	4953	4760
query73	723	660	351	351
query74	8951	9254	8631	8631
query75	3859	3173	2657	2657
query76	3613	1222	779	779
query77	796	389	296	296
query78	9908	10071	9275	9275
query79	1642	809	563	563
query80	615	522	484	484
query81	463	254	217	217
query82	323	126	97	97
query83	288	255	240	240
query84	297	101	87	87
query85	754	351	308	308
query86	334	310	291	291
query87	4382	4539	4326	4326
query88	2773	2211	2215	2211
query89	374	322	285	285
query90	2048	213	213	213
query91	140	139	110	110
query92	89	61	60	60
query93	1086	966	578	578
query94	673	400	309	309
query95	384	294	282	282
query96	494	567	274	274
query97	3136	3233	3094	3094
query98	226	210	207	207
query99	1398	1426	1276	1276
Total cold run time: 271054 ms
Total hot run time: 184768 ms
```
</details>

author_association: NONE
user: login: doris-robot
created_at: 2025-04-23T12:53:32Z
body: 
<details>
<summary>ClickBench: <b>Total hot run time: 29.77 s</b></summary>

```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 629b96b80a4bf5853f383b827b09e07f5556d121, data reload: false

query1	0.04	0.03	0.03
query2	0.12	0.11	0.10
query3	0.25	0.19	0.19
query4	1.60	0.19	0.19
query5	0.60	0.60	0.59
query6	1.19	0.71	0.72
query7	0.02	0.02	0.02
query8	0.04	0.03	0.05
query9	0.58	0.53	0.51
query10	0.59	0.56	0.57
query11	0.16	0.10	0.11
query12	0.15	0.11	0.12
query13	0.61	0.60	0.60
query14	1.16	1.17	1.19
query15	0.87	0.85	0.85
query16	0.38	0.39	0.39
query17	1.05	1.05	1.02
query18	0.22	0.20	0.20
query19	1.91	1.85	1.85
query20	0.02	0.01	0.02
query21	15.41	0.88	0.55
query22	0.75	0.99	0.59
query23	15.26	1.32	0.61
query24	6.68	1.49	1.05
query25	0.50	0.26	0.06
query26	0.60	0.15	0.13
query27	0.05	0.05	0.05
query28	9.83	0.90	0.44
query29	12.53	3.97	3.32
query30	0.25	0.10	0.07
query31	2.82	0.58	0.38
query32	3.22	0.55	0.47
query33	3.00	3.11	3.06
query34	15.74	5.11	4.49
query35	4.52	4.49	4.47
query36	0.66	0.50	0.48
query37	0.08	0.07	0.06
query38	0.06	0.04	0.04
query39	0.03	0.02	0.02
query40	0.16	0.14	0.13
query41	0.08	0.02	0.02
query42	0.03	0.02	0.02
query43	0.03	0.04	0.03
Total cold run time: 103.85 s
Total hot run time: 29.77 s
```
</details>

author_association: NONE
user: login: zddr
created_at: 2025-04-24T02:21:37Z
body: run buildall
author_association: CONTRIBUTOR
user: login: doris-robot
created_at: 2025-04-24T02:55:40Z
body: 
<details>
<summary>TPC-H: <b>Total hot run time: 33829 ms</b></summary>

```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 8339d9ba6b9f876a66954d392fc7b23041fa4325, data reload: false

------ Round 1 ----------------------------------
q1	26090	5055	4930	4930
q2	2054	286	184	184
q3	10390	1252	689	689
q4	10218	994	536	536
q5	7546	2325	2344	2325
q6	178	164	131	131
q7	917	742	607	607
q8	9303	1254	1025	1025
q9	6795	5092	5190	5092
q10	6860	2303	1913	1913
q11	479	274	262	262
q12	357	358	216	216
q13	17809	3670	3054	3054
q14	244	236	210	210
q15	540	479	500	479
q16	434	449	396	396
q17	585	846	341	341
q18	7754	7426	7268	7268
q19	1610	933	524	524
q20	314	319	213	213
q21	3891	3365	2446	2446
q22	1058	1044	988	988
Total cold run time: 115426 ms
Total hot run time: 33829 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5148	5003	5020	5003
q2	242	331	226	226
q3	2116	2617	2292	2292
q4	1415	1802	1390	1390
q5	4463	4419	4350	4350
q6	226	177	133	133
q7	2000	1922	1759	1759
q8	2577	2452	2442	2442
q9	7274	7222	7104	7104
q10	2972	3174	2755	2755
q11	598	514	488	488
q12	674	792	640	640
q13	3514	3912	3381	3381
q14	279	293	270	270
q15	523	484	473	473
q16	463	515	461	461
q17	1155	1537	1441	1441
q18	7742	7493	7451	7451
q19	784	814	992	814
q20	1939	1934	1830	1830
q21	5303	4859	4753	4753
q22	1124	1054	1048	1048
Total cold run time: 52531 ms
Total hot run time: 50504 ms
```
</details>

author_association: NONE
user: login: doris-robot
created_at: 2025-04-24T03:07:53Z
body: 
<details>
<summary>TPC-DS: <b>Total hot run time: 192755 ms</b></summary>

```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 8339d9ba6b9f876a66954d392fc7b23041fa4325, data reload: false

query1	1433	1077	1089	1077
query2	6175	1845	1782	1782
query3	11125	4697	4462	4462
query4	54400	25079	23326	23326
query5	5218	518	435	435
query6	349	210	202	202
query7	4936	488	302	302
query8	343	241	240	240
query9	6090	2576	2590	2576
query10	414	321	257	257
query11	15112	15283	14791	14791
query12	167	110	107	107
query13	1094	516	395	395
query14	10042	6485	6448	6448
query15	203	195	176	176
query16	7021	662	543	543
query17	1079	780	590	590
query18	1615	412	327	327
query19	204	193	178	178
query20	130	131	119	119
query21	206	131	118	118
query22	4423	4386	4255	4255
query23	33970	33336	33434	33336
query24	6697	2432	2422	2422
query25	449	474	404	404
query26	707	271	162	162
query27	2364	512	333	333
query28	3218	2144	2133	2133
query29	571	559	449	449
query30	278	220	188	188
query31	871	885	756	756
query32	70	71	63	63
query33	452	366	309	309
query34	783	888	521	521
query35	818	867	792	792
query36	959	985	916	916
query37	115	97	84	84
query38	4243	4222	4158	4158
query39	1487	1514	1480	1480
query40	209	128	102	102
query41	80	55	52	52
query42	125	118	110	110
query43	492	517	501	501
query44	1331	816	866	816
query45	181	180	164	164
query46	845	1032	633	633
query47	1815	1857	1830	1830
query48	384	416	321	321
query49	685	515	432	432
query50	644	689	412	412
query51	4317	4205	4182	4182
query52	111	109	95	95
query53	238	269	193	193
query54	582	564	509	509
query55	84	86	84	84
query56	301	309	317	309
query57	1153	1201	1163	1163
query58	271	264	281	264
query59	2691	2731	2639	2639
query60	342	314	307	307
query61	137	129	130	129
query62	788	745	703	703
query63	228	185	199	185
query64	1844	1033	720	720
query65	4312	4263	4243	4243
query66	718	395	303	303
query67	15749	15461	15423	15423
query68	6857	869	521	521
query69	560	318	272	272
query70	1181	1114	1165	1114
query71	490	312	302	302
query72	5914	4856	5103	4856
query73	1217	723	342	342
query74	8982	8994	8770	8770
query75	3800	3164	2723	2723
query76	4147	1196	753	753
query77	611	358	286	286
query78	10200	10134	9220	9220
query79	2247	813	565	565
query80	610	515	442	442
query81	493	246	219	219
query82	452	126	95	95
query83	411	254	232	232
query84	297	106	96	96
query85	766	367	312	312
query86	390	296	280	280
query87	4376	4389	4337	4337
query88	3628	2249	2231	2231
query89	400	319	286	286
query90	1803	210	222	210
query91	137	139	111	111
query92	74	63	58	58
query93	1931	938	589	589
query94	664	404	310	310
query95	374	295	294	294
query96	486	561	276	276
query97	3206	3181	3122	3122
query98	237	204	200	200
query99	1456	1419	1295	1295
Total cold run time: 298885 ms
Total hot run time: 192755 ms
```
</details>

author_association: NONE
user: login: doris-robot
created_at: 2025-04-24T03:13:05Z
body: 
<details>
<summary>ClickBench: <b>Total hot run time: 29.46 s</b></summary>

```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 8339d9ba6b9f876a66954d392fc7b23041fa4325, data reload: false

query1	0.04	0.04	0.03
query2	0.12	0.10	0.11
query3	0.25	0.19	0.19
query4	1.60	0.19	0.19
query5	0.59	0.57	0.59
query6	1.18	0.72	0.72
query7	0.02	0.01	0.01
query8	0.04	0.04	0.04
query9	0.57	0.54	0.51
query10	0.56	0.56	0.56
query11	0.16	0.10	0.11
query12	0.15	0.11	0.12
query13	0.62	0.60	0.60
query14	1.16	1.16	1.18
query15	0.86	0.85	0.85
query16	0.40	0.38	0.38
query17	0.99	1.02	1.06
query18	0.22	0.21	0.20
query19	1.92	1.80	1.81
query20	0.01	0.01	0.02
query21	15.40	0.89	0.55
query22	0.76	1.37	0.63
query23	14.80	1.40	0.64
query24	7.76	0.73	1.09
query25	0.46	0.13	0.09
query26	0.68	0.17	0.13
query27	0.06	0.05	0.05
query28	9.36	0.83	0.45
query29	12.59	4.04	3.34
query30	0.25	0.09	0.06
query31	2.81	0.58	0.39
query32	3.24	0.55	0.45
query33	3.05	2.96	3.05
query34	15.81	5.13	4.51
query35	4.58	4.52	4.56
query36	0.68	0.50	0.50
query37	0.09	0.06	0.07
query38	0.05	0.04	0.03
query39	0.03	0.02	0.03
query40	0.17	0.14	0.12
query41	0.08	0.03	0.03
query42	0.03	0.02	0.03
query43	0.04	0.04	0.03
Total cold run time: 104.24 s
Total hot run time: 29.46 s
```
</details>

author_association: NONE
user: login: zddr
created_at: 2025-04-25T03:12:17Z
body: run p0
author_association: CONTRIBUTOR
user: login: github-actions[bot]
created_at: 2025-04-28T05:05:35Z
body: PR approved by at least one committer and no changes requested.
author_association: CONTRIBUTOR
user: login: github-actions[bot]
created_at: 2025-04-28T05:05:37Z
body: PR approved by anyone and no changes requested.
author_association: CONTRIBUTOR