Repository: apache/doris
Pull request #48587: [Enhancement] (nereids) support show column histogram command
Author: login: xiedeyantu
Labels: name: approved
description: Indicates a PR has been approved by one committer.
name: reviewed
Created: 2025-03-03T14:31:46Z | Merged: 2025-03-05T03:09:06Z

### What problem does this PR solve?

Issue Number: close #42718

Problem Summary:

### Release note

None

### Check List (For Author)

- Test <!-- At least one of them must be included. -->
    - [ ] Regression test
    - [ ] Unit Test
    - [ ] Manual test (add detailed scripts or steps below)
    - [x] 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.
        - [x] Support in the future

- Behavior changed:
    - [x] No.
    - [ ] Yes. <!-- Explain the behavior change -->

- Does this need documentation?
    - [x] No.
    - [ ] 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 -->



Linked issue #42718: [Enhancement] (nereids)implement showColumnHistogramStatsCommand in nereids
showColumnHistogramStats command is supported in legacy planner but not in nereids(new doris fe planner). you need implement the following showColumnHistogramStats command in nereids:
unsupportedshowColumnHistogramStatsStatement
- [ ] SHOW COLUMN HISTOGRAM tableName=multipartIdentifier
    columnList=identifierList                                               
Linked issue comments: user: login: xiedeyantu
created_at: 2025-03-02T02:51:36Z
body: @starocean999 pick it
author_association: MEMBER

Diff:
diff --git a/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4 b/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4
index 99797ea7236fa2..8b0580390d5e6b 100644
--- a/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4
+++ b/fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4
@@ -731,6 +731,8 @@ supportedStatsStatement
         (WHERE (stateKey=identifier) EQ (stateValue=STRING_LITERAL))?           #showAnalyze
     | SHOW QUEUED ANALYZE JOBS tableName=multipartIdentifier?
         (WHERE (stateKey=identifier) EQ (stateValue=STRING_LITERAL))?           #showQueuedAnalyzeJobs
+    | SHOW COLUMN HISTOGRAM tableName=multipartIdentifier
+        columnList=identifierList                                               #showColumnHistogramStats
     | ANALYZE DATABASE name=multipartIdentifier
         (WITH analyzeProperties)* propertyClause?                               #analyzeDatabase
     | ANALYZE TABLE name=multipartIdentifier partitionSpec?
@@ -755,8 +757,6 @@ unsupportedStatsStatement
     | SHOW INDEX STATS tableName=multipartIdentifier indexId=identifier         #showIndexStats
     | SHOW COLUMN CACHED? STATS tableName=multipartIdentifier
         columnList=identifierList? partitionSpec?                               #showColumnStats
-    | SHOW COLUMN HISTOGRAM tableName=multipartIdentifier
-        columnList=identifierList                                               #showColumnHistogramStats
     | SHOW ANALYZE TASK STATUS jobId=INTEGER_VALUE                              #showAnalyzeTask
     ;
 
diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java
index a0187112c96113..8627437ac4419b 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java
@@ -299,6 +299,7 @@
 import org.apache.doris.nereids.DorisParser.ShowBrokerContext;
 import org.apache.doris.nereids.DorisParser.ShowCharsetContext;
 import org.apache.doris.nereids.DorisParser.ShowCollationContext;
+import org.apache.doris.nereids.DorisParser.ShowColumnHistogramStatsContext;
 import org.apache.doris.nereids.DorisParser.ShowConfigContext;
 import org.apache.doris.nereids.DorisParser.ShowConstraintContext;
 import org.apache.doris.nereids.DorisParser.ShowConvertLscContext;
@@ -600,6 +601,7 @@
 import org.apache.doris.nereids.trees.plans.commands.ShowCatalogCommand;
 import org.apache.doris.nereids.trees.plans.commands.ShowCharsetCommand;
 import org.apache.doris.nereids.trees.plans.commands.ShowCollationCommand;
+import org.apache.doris.nereids.trees.plans.commands.ShowColumnHistogramStatsCommand;
 import org.apache.doris.nereids.trees.plans.commands.ShowConfigCommand;
 import org.apache.doris.nereids.trees.plans.commands.ShowConstraintsCommand;
 import org.apache.doris.nereids.trees.plans.commands.ShowConvertLSCCommand;
@@ -5987,6 +5989,13 @@ public Map<String, String> visitAnalyzeProperties(DorisParser.AnalyzePropertiesC
         return properties;
     }
 
+    @Override
+    public LogicalPlan visitShowColumnHistogramStats(ShowColumnHistogramStatsContext ctx) {
+        TableNameInfo tableNameInfo = new TableNameInfo(visitMultipartIdentifier(ctx.tableName));
+        List<String> columnNames = visitIdentifierList(ctx.columnList);
+        return new ShowColumnHistogramStatsCommand(tableNameInfo, columnNames);
+    }
+
     @Override
     public LogicalPlan visitDescribeTableAll(DorisParser.DescribeTableAllContext ctx) {
         TableNameInfo tableName = new TableNameInfo(visitMultipartIdentifier(ctx.multipartIdentifier()));
diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/PlanType.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/PlanType.java
index 7ed70ba2428a07..3824d127cd9af6 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/PlanType.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/PlanType.java
@@ -225,6 +225,7 @@ public enum PlanType {
     SHOW_CATALOG_COMMAND,
     SHOW_CHARSET_COMMAND,
     SHOW_COLLATION_COMMAND,
+    SHOW_COLUMN_HISTOGRAM,
     SHOW_CONFIG_COMMAND,
     SHOW_CREATE_CATALOG_COMMAND,
     SHOW_CREATE_DATABASE_COMMAND,
diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowColumnHistogramStatsCommand.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowColumnHistogramStatsCommand.java
new file mode 100644
index 00000000000000..ffa085baa0fa88
--- /dev/null
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowColumnHistogramStatsCommand.java
@@ -0,0 +1,180 @@
+// 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.
+
+package org.apache.doris.nereids.trees.plans.commands;
+
+import org.apache.doris.catalog.Column;
+import org.apache.doris.catalog.DatabaseIf;
+import org.apache.doris.catalog.Env;
+import org.apache.doris.catalog.ScalarType;
+import org.apache.doris.catalog.TableIf;
+import org.apache.doris.catalog.Type;
+import org.apache.doris.common.ErrorCode;
+import org.apache.doris.common.ErrorReport;
+import org.apache.doris.common.Pair;
+import org.apache.doris.common.UserException;
+import org.apache.doris.common.util.Util;
+import org.apache.doris.datasource.CatalogIf;
+import org.apache.doris.mysql.privilege.PrivPredicate;
+import org.apache.doris.nereids.trees.plans.PlanType;
+import org.apache.doris.nereids.trees.plans.commands.info.TableNameInfo;
+import org.apache.doris.nereids.trees.plans.visitor.PlanVisitor;
+import org.apache.doris.qe.ConnectContext;
+import org.apache.doris.qe.ShowResultSet;
+import org.apache.doris.qe.ShowResultSetMetaData;
+import org.apache.doris.qe.StmtExecutor;
+import org.apache.doris.statistics.Histogram;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * Represents the command for SHOW COLUMN HISTOGRAM
+ */
+public class ShowColumnHistogramStatsCommand extends ShowCommand {
+    /**
+     * TITLE_NAMES
+     */
+    private static final ImmutableList<String> TITLE_NAMES =
+            new ImmutableList.Builder<String>()
+                    .add("column_name")
+                    .add("data_type")
+                    .add("sample_rate")
+                    .add("num_buckets")
+                    .add("buckets")
+                    .build();
+
+    private TableNameInfo tableNameInfo;
+
+    private final List<String> columnNames;
+
+    private TableIf table;
+
+    public ShowColumnHistogramStatsCommand(TableNameInfo tableNameInfo, List<String> columnNames) {
+        super(PlanType.SHOW_COLUMN_HISTOGRAM);
+        this.tableNameInfo = tableNameInfo;
+        this.columnNames = columnNames;
+    }
+
+    /**
+     * validate
+     */
+    public void validate(ConnectContext ctx) throws UserException {
+        tableNameInfo.analyze(ctx);
+
+        // disallow external catalog
+        Util.prohibitExternalCatalog(tableNameInfo.getCtl(), this.getClass().getSimpleName());
+        CatalogIf<DatabaseIf> catalog = Env.getCurrentEnv().getCatalogMgr().getCatalog(tableNameInfo.getCtl());
+        if (catalog == null) {
+            ErrorReport.reportAnalysisException("Catalog: {} not exists", tableNameInfo.getCtl());
+        }
+        DatabaseIf<TableIf> db = catalog.getDb(tableNameInfo.getDb()).orElse(null);
+        if (db == null) {
+            ErrorReport.reportAnalysisException("DB: {} not exists", tableNameInfo.getDb());
+        }
+        table = db.getTable(tableNameInfo.getTbl()).orElse(null);
+        if (table == null) {
+            ErrorReport.reportAnalysisException("Table: {} not exists", tableNameInfo.getTbl());
+        }
+
+        if (!Env.getCurrentEnv().getAccessManager()
+                .checkTblPriv(ConnectContext.get(), tableNameInfo.getCtl(), tableNameInfo.getDb(),
+                        tableNameInfo.getTbl(), PrivPredicate.SHOW)) {
+            ErrorReport.reportAnalysisException(ErrorCode.ERR_TABLEACCESS_DENIED_ERROR, "Permission denied",
+                    ConnectContext.get().getQualifiedUser(), ConnectContext.get().getRemoteIP(),
+                    tableNameInfo.getDb() + ": " + tableNameInfo.getTbl());
+        }
+
+        if (columnNames != null) {
+            Optional<Column> nullColumn = columnNames.stream()
+                    .map(table::getColumn)
+                    .filter(Objects::isNull)
+                    .findFirst();
+            if (nullColumn.isPresent()) {
+                ErrorReport.reportAnalysisException("Column: {} not exists", nullColumn.get());
+            }
+        }
+    }
+
+    /**
+     * getMetaData
+     */
+    public ShowResultSetMetaData getMetaData() {
+        ShowResultSetMetaData.Builder builder = ShowResultSetMetaData.builder();
+
+        for (String title : TITLE_NAMES) {
+            builder.addColumn(new Column(title, ScalarType.createVarchar(30)));
+        }
+        return builder.build();
+    }
+
+    public TableIf getTable() {
+        return table;
+    }
+
+    /**
+     * constructResultSet
+     */
+    public ShowResultSet constructResultSet(List<Pair<String, Histogram>> columnStatistics) {
+        List<List<String>> result = Lists.newArrayList();
+        columnStatistics.forEach(p -> {
+            if (p.second == null || p.second.dataType == Type.NULL) {
+                return;
+            }
+            List<String> row = Lists.newArrayList();
+            row.add(p.first);
+            row.add(String.valueOf(p.second.dataType));
+            row.add(String.valueOf(p.second.sampleRate));
+            row.add(String.valueOf(p.second.numBuckets));
+            row.add(Histogram.getBucketsJson(p.second.buckets).toString());
+            result.add(row);
+        });
+
+        return new ShowResultSet(getMetaData(), result);
+    }
+
+    /**
+     * getColumnNames
+     */
+    public Set<String> getColumnNames() {
+        if (columnNames != null) {
+            return Sets.newHashSet(columnNames);
+        }
+        return table.getColumns().stream()
+                .map(Column::getName).collect(Collectors.toSet());
+    }
+
+    @Override
+    public ShowResultSet doRun(ConnectContext ctx, StmtExecutor executor) throws Exception {
+        validate(ctx);
+        List<Pair<String, Histogram>> columnStatistics = Lists.newArrayList();
+        // TODO: support histogram in the future.
+        return constructResultSet(columnStatistics);
+    }
+
+    @Override
+    public <R, C> R accept(PlanVisitor<R, C> visitor, C context) {
+        return visitor.visitShowColumnHistogramStatsCommand(this, context);
+    }
+}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/visitor/CommandVisitor.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/visitor/CommandVisitor.java
index b7b63debc5545d..f73dff5a445372 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/visitor/CommandVisitor.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/visitor/CommandVisitor.java
@@ -103,6 +103,7 @@
 import org.apache.doris.nereids.trees.plans.commands.ShowCatalogCommand;
 import org.apache.doris.nereids.trees.plans.commands.ShowCharsetCommand;
 import org.apache.doris.nereids.trees.plans.commands.ShowCollationCommand;
+import org.apache.doris.nereids.trees.plans.commands.ShowColumnHistogramStatsCommand;
 import org.apache.doris.nereids.trees.plans.commands.ShowConfigCommand;
 import org.apache.doris.nereids.trees.plans.commands.ShowConstraintsCommand;
 import org.apache.doris.nereids.trees.plans.commands.ShowConvertLSCCommand;
@@ -805,6 +806,11 @@ default R visitShowQueuedAnalyzeJobsCommand(ShowQueuedAnalyzeJobsCommand showQue
         return visitCommand(showQueuedAnalyzeJobsCommand, context);
     }
 
+    default R visitShowColumnHistogramStatsCommand(ShowColumnHistogramStatsCommand showColumnHistogramStatCommand,
+                                                   C context) {
+        return visitCommand(showColumnHistogramStatCommand, context);
+    }
+
     default R visitDescribeCommand(DescribeCommand describeCommand, C context) {
         return visitCommand(describeCommand, context);
     }
diff --git a/fe/fe-core/src/main/java/org/apache/doris/statistics/StatisticsRepository.java b/fe/fe-core/src/main/java/org/apache/doris/statistics/StatisticsRepository.java
index ac4704b54c6aae..beac03a53a70f2 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/statistics/StatisticsRepository.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/statistics/StatisticsRepository.java
@@ -198,7 +198,7 @@ private static ResultRow queryColumnStatisticById(long ctlId, long dbId, long tb
         return size == 0 ? null : rows.get(0);
     }
 
-    private static Histogram queryColumnHistogramByName(
+    public static Histogram queryColumnHistogramByName(
             long ctlId, long dbId, long tableId, long indexId, String colName) {
         ResultRow resultRow = queryColumnHistogramById(ctlId, dbId, tableId, indexId, colName);
         if (resultRow == null) {


Reviews:
user: login: starocean999
state: DISMISSED
author_association: CONTRIBUTOR
submitted_at: 2025-03-04T02:03:36Z
user: login: LiBinfeng-01
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-04T02:21:43Z
user: login: xiedeyantu
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-04T02:31:51Z
user: login: xiedeyantu
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-04T04:20:19Z
user: login: starocean999
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-03-05T02:39:52Z
user: login: LiBinfeng-01
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-03-05T02:58:28Z

Review comments:
diff_hunk: @@ -0,0 +1,189 @@
+// 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.
+
+package org.apache.doris.nereids.trees.plans.commands;
+
+import org.apache.doris.catalog.Column;
+import org.apache.doris.catalog.DatabaseIf;
+import org.apache.doris.catalog.Env;
+import org.apache.doris.catalog.ScalarType;
+import org.apache.doris.catalog.TableIf;
+import org.apache.doris.catalog.Type;
+import org.apache.doris.common.ErrorCode;
+import org.apache.doris.common.ErrorReport;
+import org.apache.doris.common.Pair;
+import org.apache.doris.common.UserException;
+import org.apache.doris.common.util.Util;
+import org.apache.doris.datasource.CatalogIf;
+import org.apache.doris.mysql.privilege.PrivPredicate;
+import org.apache.doris.nereids.trees.plans.PlanType;
+import org.apache.doris.nereids.trees.plans.commands.info.TableNameInfo;
+import org.apache.doris.nereids.trees.plans.visitor.PlanVisitor;
+import org.apache.doris.qe.ConnectContext;
+import org.apache.doris.qe.ShowResultSet;
+import org.apache.doris.qe.ShowResultSetMetaData;
+import org.apache.doris.qe.StmtExecutor;
+import org.apache.doris.statistics.Histogram;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * Represents the command for SHOW COLUMN HISTOGRAM
+ */
+public class ShowColumnHistogramStatsCommand extends ShowCommand {
+    /**
+     * TITLE_NAMES
+     */
+    private static final ImmutableList<String> TITLE_NAMES =
+            new ImmutableList.Builder<String>()
+                    .add("column_name")
+                    .add("data_type")
+                    .add("sample_rate")
+                    .add("num_buckets")
+                    .add("buckets")
+                    .build();
+
+    private TableNameInfo tableNameInfo;
+
+    private final List<String> columnNames;
+
+    private TableIf table;
+
+    public ShowColumnHistogramStatsCommand(TableNameInfo tableNameInfo, List<String> columnNames) {
+        super(PlanType.SHOW_COLUMN_HISTOGRAM);
+        this.tableNameInfo = tableNameInfo;
+        this.columnNames = columnNames;
+    }
+
+    /**
+     * validate
+     */
+    public void validate(ConnectContext ctx) throws UserException {
+        tableNameInfo.analyze(ctx);
+
+        // disallow external catalog
+        Util.prohibitExternalCatalog(tableNameInfo.getCtl(), this.getClass().getSimpleName());
+        CatalogIf<DatabaseIf> catalog = Env.getCurrentEnv().getCatalogMgr().getCatalog(tableNameInfo.getCtl());
+        if (catalog == null) {
+            ErrorReport.reportAnalysisException("Catalog: {} not exists", tableNameInfo.getCtl());
+        }
+        DatabaseIf<TableIf> db = catalog.getDb(tableNameInfo.getDb()).orElse(null);
+        if (db == null) {
+            ErrorReport.reportAnalysisException("DB: {} not exists", tableNameInfo.getDb());
+        }
+        table = db.getTable(tableNameInfo.getTbl()).orElse(null);
+        if (table == null) {
+            ErrorReport.reportAnalysisException("Table: {} not exists", tableNameInfo.getTbl());
+        }
+
+        if (!Env.getCurrentEnv().getAccessManager()
+                .checkTblPriv(ConnectContext.get(), tableNameInfo.getCtl(), tableNameInfo.getDb(),
+                        tableNameInfo.getTbl(), PrivPredicate.SHOW)) {
+            ErrorReport.reportAnalysisException(ErrorCode.ERR_TABLEACCESS_DENIED_ERROR, "Permission denied",
+                    ConnectContext.get().getQualifiedUser(), ConnectContext.get().getRemoteIP(),
+                    tableNameInfo.getDb() + ": " + tableNameInfo.getTbl());
+        }
+
+        if (columnNames != null) {
+            Optional<Column> nullColumn = columnNames.stream()
+                    .map(table::getColumn)
+                    .filter(Objects::isNull)
+                    .findFirst();
+            if (nullColumn.isPresent()) {
+                ErrorReport.reportAnalysisException("Column: {} not exists", nullColumn.get());
+            }
+        }
+    }
+
+    /**
+     * getMetaData
+     */
+    public ShowResultSetMetaData getMetaData() {
+        ShowResultSetMetaData.Builder builder = ShowResultSetMetaData.builder();
+
+        for (String title : TITLE_NAMES) {
+            builder.addColumn(new Column(title, ScalarType.createVarchar(30)));
+        }
+        return builder.build();
+    }
+
+    public TableIf getTable() {
+        return table;
+    }
+
+    /**
+     * constructResultSet
+     */
+    public ShowResultSet constructResultSet(List<Pair<String, Histogram>> columnStatistics) {
+        List<List<String>> result = Lists.newArrayList();
+        columnStatistics.forEach(p -> {
+            if (p.second == null || p.second.dataType == Type.NULL) {
+                return;
+            }
+            List<String> row = Lists.newArrayList();
+            row.add(p.first);
+            row.add(String.valueOf(p.second.dataType));
+            row.add(String.valueOf(p.second.sampleRate));
+            row.add(String.valueOf(p.second.numBuckets));
+            row.add(Histogram.getBucketsJson(p.second.buckets).toString());
+            result.add(row);
+        });
+
+        return new ShowResultSet(getMetaData(), result);
+    }
+
+    /**
+     * getColumnNames
+     */
+    public Set<String> getColumnNames() {
+        if (columnNames != null) {
+            return Sets.newHashSet(columnNames);
+        }
+        return table.getColumns().stream()
+                .map(Column::getName).collect(Collectors.toSet());
+    }
+
+    @Override
+    public ShowResultSet doRun(ConnectContext ctx, StmtExecutor executor) throws Exception {
+        validate(ctx);
+        List<Pair<String, Histogram>> columnStatistics = Lists.newArrayList();
+
+        // TODO: support histogram in the future.
path: fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowColumnHistogramStatsCommand.java
user: login: LiBinfeng-01
body: pls remove todo quoted code block if we do not want to support it immediately
created_at: 2025-03-04T02:21:43Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,189 @@
+// 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.
+
+package org.apache.doris.nereids.trees.plans.commands;
+
+import org.apache.doris.catalog.Column;
+import org.apache.doris.catalog.DatabaseIf;
+import org.apache.doris.catalog.Env;
+import org.apache.doris.catalog.ScalarType;
+import org.apache.doris.catalog.TableIf;
+import org.apache.doris.catalog.Type;
+import org.apache.doris.common.ErrorCode;
+import org.apache.doris.common.ErrorReport;
+import org.apache.doris.common.Pair;
+import org.apache.doris.common.UserException;
+import org.apache.doris.common.util.Util;
+import org.apache.doris.datasource.CatalogIf;
+import org.apache.doris.mysql.privilege.PrivPredicate;
+import org.apache.doris.nereids.trees.plans.PlanType;
+import org.apache.doris.nereids.trees.plans.commands.info.TableNameInfo;
+import org.apache.doris.nereids.trees.plans.visitor.PlanVisitor;
+import org.apache.doris.qe.ConnectContext;
+import org.apache.doris.qe.ShowResultSet;
+import org.apache.doris.qe.ShowResultSetMetaData;
+import org.apache.doris.qe.StmtExecutor;
+import org.apache.doris.statistics.Histogram;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * Represents the command for SHOW COLUMN HISTOGRAM
+ */
+public class ShowColumnHistogramStatsCommand extends ShowCommand {
+    /**
+     * TITLE_NAMES
+     */
+    private static final ImmutableList<String> TITLE_NAMES =
+            new ImmutableList.Builder<String>()
+                    .add("column_name")
+                    .add("data_type")
+                    .add("sample_rate")
+                    .add("num_buckets")
+                    .add("buckets")
+                    .build();
+
+    private TableNameInfo tableNameInfo;
+
+    private final List<String> columnNames;
+
+    private TableIf table;
+
+    public ShowColumnHistogramStatsCommand(TableNameInfo tableNameInfo, List<String> columnNames) {
+        super(PlanType.SHOW_COLUMN_HISTOGRAM);
+        this.tableNameInfo = tableNameInfo;
+        this.columnNames = columnNames;
+    }
+
+    /**
+     * validate
+     */
+    public void validate(ConnectContext ctx) throws UserException {
+        tableNameInfo.analyze(ctx);
+
+        // disallow external catalog
+        Util.prohibitExternalCatalog(tableNameInfo.getCtl(), this.getClass().getSimpleName());
+        CatalogIf<DatabaseIf> catalog = Env.getCurrentEnv().getCatalogMgr().getCatalog(tableNameInfo.getCtl());
+        if (catalog == null) {
+            ErrorReport.reportAnalysisException("Catalog: {} not exists", tableNameInfo.getCtl());
+        }
+        DatabaseIf<TableIf> db = catalog.getDb(tableNameInfo.getDb()).orElse(null);
+        if (db == null) {
+            ErrorReport.reportAnalysisException("DB: {} not exists", tableNameInfo.getDb());
+        }
+        table = db.getTable(tableNameInfo.getTbl()).orElse(null);
+        if (table == null) {
+            ErrorReport.reportAnalysisException("Table: {} not exists", tableNameInfo.getTbl());
+        }
+
+        if (!Env.getCurrentEnv().getAccessManager()
+                .checkTblPriv(ConnectContext.get(), tableNameInfo.getCtl(), tableNameInfo.getDb(),
+                        tableNameInfo.getTbl(), PrivPredicate.SHOW)) {
+            ErrorReport.reportAnalysisException(ErrorCode.ERR_TABLEACCESS_DENIED_ERROR, "Permission denied",
+                    ConnectContext.get().getQualifiedUser(), ConnectContext.get().getRemoteIP(),
+                    tableNameInfo.getDb() + ": " + tableNameInfo.getTbl());
+        }
+
+        if (columnNames != null) {
+            Optional<Column> nullColumn = columnNames.stream()
+                    .map(table::getColumn)
+                    .filter(Objects::isNull)
+                    .findFirst();
+            if (nullColumn.isPresent()) {
+                ErrorReport.reportAnalysisException("Column: {} not exists", nullColumn.get());
+            }
+        }
+    }
+
+    /**
+     * getMetaData
+     */
+    public ShowResultSetMetaData getMetaData() {
+        ShowResultSetMetaData.Builder builder = ShowResultSetMetaData.builder();
+
+        for (String title : TITLE_NAMES) {
+            builder.addColumn(new Column(title, ScalarType.createVarchar(30)));
+        }
+        return builder.build();
+    }
+
+    public TableIf getTable() {
+        return table;
+    }
+
+    /**
+     * constructResultSet
+     */
+    public ShowResultSet constructResultSet(List<Pair<String, Histogram>> columnStatistics) {
+        List<List<String>> result = Lists.newArrayList();
+        columnStatistics.forEach(p -> {
+            if (p.second == null || p.second.dataType == Type.NULL) {
+                return;
+            }
+            List<String> row = Lists.newArrayList();
+            row.add(p.first);
+            row.add(String.valueOf(p.second.dataType));
+            row.add(String.valueOf(p.second.sampleRate));
+            row.add(String.valueOf(p.second.numBuckets));
+            row.add(Histogram.getBucketsJson(p.second.buckets).toString());
+            result.add(row);
+        });
+
+        return new ShowResultSet(getMetaData(), result);
+    }
+
+    /**
+     * getColumnNames
+     */
+    public Set<String> getColumnNames() {
+        if (columnNames != null) {
+            return Sets.newHashSet(columnNames);
+        }
+        return table.getColumns().stream()
+                .map(Column::getName).collect(Collectors.toSet());
+    }
+
+    @Override
+    public ShowResultSet doRun(ConnectContext ctx, StmtExecutor executor) throws Exception {
+        validate(ctx);
+        List<Pair<String, Histogram>> columnStatistics = Lists.newArrayList();
+
+        // TODO: support histogram in the future.
path: fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowColumnHistogramStatsCommand.java
user: login: xiedeyantu
body: > pls remove todo quoted code block if we do not want to support it immediately

@LiBinfeng-01 Now the old optimization has this description, which is copied here to explain why it is commented out now.
created_at: 2025-03-04T02:31:50Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,189 @@
+// 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.
+
+package org.apache.doris.nereids.trees.plans.commands;
+
+import org.apache.doris.catalog.Column;
+import org.apache.doris.catalog.DatabaseIf;
+import org.apache.doris.catalog.Env;
+import org.apache.doris.catalog.ScalarType;
+import org.apache.doris.catalog.TableIf;
+import org.apache.doris.catalog.Type;
+import org.apache.doris.common.ErrorCode;
+import org.apache.doris.common.ErrorReport;
+import org.apache.doris.common.Pair;
+import org.apache.doris.common.UserException;
+import org.apache.doris.common.util.Util;
+import org.apache.doris.datasource.CatalogIf;
+import org.apache.doris.mysql.privilege.PrivPredicate;
+import org.apache.doris.nereids.trees.plans.PlanType;
+import org.apache.doris.nereids.trees.plans.commands.info.TableNameInfo;
+import org.apache.doris.nereids.trees.plans.visitor.PlanVisitor;
+import org.apache.doris.qe.ConnectContext;
+import org.apache.doris.qe.ShowResultSet;
+import org.apache.doris.qe.ShowResultSetMetaData;
+import org.apache.doris.qe.StmtExecutor;
+import org.apache.doris.statistics.Histogram;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * Represents the command for SHOW COLUMN HISTOGRAM
+ */
+public class ShowColumnHistogramStatsCommand extends ShowCommand {
+    /**
+     * TITLE_NAMES
+     */
+    private static final ImmutableList<String> TITLE_NAMES =
+            new ImmutableList.Builder<String>()
+                    .add("column_name")
+                    .add("data_type")
+                    .add("sample_rate")
+                    .add("num_buckets")
+                    .add("buckets")
+                    .build();
+
+    private TableNameInfo tableNameInfo;
+
+    private final List<String> columnNames;
+
+    private TableIf table;
+
+    public ShowColumnHistogramStatsCommand(TableNameInfo tableNameInfo, List<String> columnNames) {
+        super(PlanType.SHOW_COLUMN_HISTOGRAM);
+        this.tableNameInfo = tableNameInfo;
+        this.columnNames = columnNames;
+    }
+
+    /**
+     * validate
+     */
+    public void validate(ConnectContext ctx) throws UserException {
+        tableNameInfo.analyze(ctx);
+
+        // disallow external catalog
+        Util.prohibitExternalCatalog(tableNameInfo.getCtl(), this.getClass().getSimpleName());
+        CatalogIf<DatabaseIf> catalog = Env.getCurrentEnv().getCatalogMgr().getCatalog(tableNameInfo.getCtl());
+        if (catalog == null) {
+            ErrorReport.reportAnalysisException("Catalog: {} not exists", tableNameInfo.getCtl());
+        }
+        DatabaseIf<TableIf> db = catalog.getDb(tableNameInfo.getDb()).orElse(null);
+        if (db == null) {
+            ErrorReport.reportAnalysisException("DB: {} not exists", tableNameInfo.getDb());
+        }
+        table = db.getTable(tableNameInfo.getTbl()).orElse(null);
+        if (table == null) {
+            ErrorReport.reportAnalysisException("Table: {} not exists", tableNameInfo.getTbl());
+        }
+
+        if (!Env.getCurrentEnv().getAccessManager()
+                .checkTblPriv(ConnectContext.get(), tableNameInfo.getCtl(), tableNameInfo.getDb(),
+                        tableNameInfo.getTbl(), PrivPredicate.SHOW)) {
+            ErrorReport.reportAnalysisException(ErrorCode.ERR_TABLEACCESS_DENIED_ERROR, "Permission denied",
+                    ConnectContext.get().getQualifiedUser(), ConnectContext.get().getRemoteIP(),
+                    tableNameInfo.getDb() + ": " + tableNameInfo.getTbl());
+        }
+
+        if (columnNames != null) {
+            Optional<Column> nullColumn = columnNames.stream()
+                    .map(table::getColumn)
+                    .filter(Objects::isNull)
+                    .findFirst();
+            if (nullColumn.isPresent()) {
+                ErrorReport.reportAnalysisException("Column: {} not exists", nullColumn.get());
+            }
+        }
+    }
+
+    /**
+     * getMetaData
+     */
+    public ShowResultSetMetaData getMetaData() {
+        ShowResultSetMetaData.Builder builder = ShowResultSetMetaData.builder();
+
+        for (String title : TITLE_NAMES) {
+            builder.addColumn(new Column(title, ScalarType.createVarchar(30)));
+        }
+        return builder.build();
+    }
+
+    public TableIf getTable() {
+        return table;
+    }
+
+    /**
+     * constructResultSet
+     */
+    public ShowResultSet constructResultSet(List<Pair<String, Histogram>> columnStatistics) {
+        List<List<String>> result = Lists.newArrayList();
+        columnStatistics.forEach(p -> {
+            if (p.second == null || p.second.dataType == Type.NULL) {
+                return;
+            }
+            List<String> row = Lists.newArrayList();
+            row.add(p.first);
+            row.add(String.valueOf(p.second.dataType));
+            row.add(String.valueOf(p.second.sampleRate));
+            row.add(String.valueOf(p.second.numBuckets));
+            row.add(Histogram.getBucketsJson(p.second.buckets).toString());
+            result.add(row);
+        });
+
+        return new ShowResultSet(getMetaData(), result);
+    }
+
+    /**
+     * getColumnNames
+     */
+    public Set<String> getColumnNames() {
+        if (columnNames != null) {
+            return Sets.newHashSet(columnNames);
+        }
+        return table.getColumns().stream()
+                .map(Column::getName).collect(Collectors.toSet());
+    }
+
+    @Override
+    public ShowResultSet doRun(ConnectContext ctx, StmtExecutor executor) throws Exception {
+        validate(ctx);
+        List<Pair<String, Histogram>> columnStatistics = Lists.newArrayList();
+
+        // TODO: support histogram in the future.
path: fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowColumnHistogramStatsCommand.java
user: login: xiedeyantu
body: > pls remove todo quoted code block if we do not want to support it immediately

@LiBinfeng-01 fixed
created_at: 2025-03-04T04:20:19Z
author_association: MEMBER

PR comments:
user: login: Thearas
created_at: 2025-03-03T14:31:51Z
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: xiedeyantu
created_at: 2025-03-03T14:32:26Z
body: run buildall
author_association: MEMBER
user: login: doris-robot
created_at: 2025-03-03T15:42:01Z
body: 
<details>
<summary>TPC-H: <b>Total hot run time: 32055 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 e50780cf14c96ed91d3b41fa100479f0b625fc2d, data reload: false

------ Round 1 ----------------------------------
q1	17656	5195	5134	5134
q2	2051	293	173	173
q3	10541	1286	719	719
q4	10251	1028	537	537
q5	8428	2419	2382	2382
q6	192	166	135	135
q7	925	770	613	613
q8	9324	1336	1131	1131
q9	4964	4923	4902	4902
q10	6824	2321	1879	1879
q11	464	283	257	257
q12	348	353	222	222
q13	17785	3687	3057	3057
q14	232	239	208	208
q15	506	472	467	467
q16	630	627	590	590
q17	584	868	343	343
q18	6706	6288	6291	6288
q19	1947	956	566	566
q20	326	320	192	192
q21	2765	2321	1959	1959
q22	362	341	301	301
Total cold run time: 103811 ms
Total hot run time: 32055 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5205	5193	5147	5147
q2	235	337	238	238
q3	2159	2742	2338	2338
q4	1444	1840	1362	1362
q5	4248	4141	4201	4141
q6	209	162	121	121
q7	1862	1911	1815	1815
q8	2646	2636	2643	2636
q9	7264	7211	7179	7179
q10	2992	3261	2798	2798
q11	577	512	482	482
q12	678	770	630	630
q13	3465	3871	3316	3316
q14	280	291	275	275
q15	509	455	466	455
q16	663	693	645	645
q17	1177	1610	1352	1352
q18	7491	7505	7251	7251
q19	833	838	931	838
q20	1960	2012	1839	1839
q21	5456	4993	4936	4936
q22	618	568	533	533
Total cold run time: 51971 ms
Total hot run time: 50327 ms
```
</details>

author_association: NONE
user: login: doris-robot
created_at: 2025-03-03T15:53:33Z
body: 
<details>
<summary>TPC-DS: <b>Total hot run time: 185169 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 e50780cf14c96ed91d3b41fa100479f0b625fc2d, data reload: false

query1	976	406	396	396
query2	6540	1894	1833	1833
query3	6804	217	212	212
query4	26194	23985	23782	23782
query5	4739	672	490	490
query6	310	195	186	186
query7	4615	510	301	301
query8	300	246	237	237
query9	8636	2537	2537	2537
query10	489	316	269	269
query11	15372	15111	14894	14894
query12	162	112	112	112
query13	1666	529	408	408
query14	10066	6227	6498	6227
query15	210	190	175	175
query16	7730	634	466	466
query17	1171	740	569	569
query18	1989	410	315	315
query19	197	191	163	163
query20	124	116	118	116
query21	206	126	104	104
query22	4563	4594	4553	4553
query23	33856	33055	33184	33055
query24	7668	2385	2364	2364
query25	533	454	393	393
query26	1225	272	155	155
query27	2122	482	321	321
query28	3970	2416	2449	2416
query29	707	555	423	423
query30	234	182	157	157
query31	945	860	786	786
query32	73	69	65	65
query33	559	381	294	294
query34	784	855	498	498
query35	791	824	728	728
query36	974	974	907	907
query37	123	99	78	78
query38	4126	4158	4063	4063
query39	1458	1380	1571	1380
query40	213	115	102	102
query41	55	51	55	51
query42	127	107	106	106
query43	503	505	476	476
query44	1285	808	796	796
query45	173	172	165	165
query46	875	1029	647	647
query47	1772	1821	1767	1767
query48	380	406	318	318
query49	790	519	421	421
query50	678	736	409	409
query51	4146	4178	4095	4095
query52	117	103	92	92
query53	225	256	185	185
query54	496	488	423	423
query55	80	84	80	80
query56	294	264	260	260
query57	1143	1144	1060	1060
query58	262	256	242	242
query59	2590	2660	2752	2660
query60	291	266	268	266
query61	122	117	120	117
query62	810	709	680	680
query63	237	193	203	193
query64	4302	989	651	651
query65	3244	3147	3126	3126
query66	1079	419	334	334
query67	15646	15905	15493	15493
query68	8144	876	509	509
query69	468	299	273	273
query70	1204	1103	1065	1065
query71	457	292	262	262
query72	5498	3628	3781	3628
query73	803	755	346	346
query74	9009	9326	8802	8802
query75	3803	3151	2674	2674
query76	3708	1185	761	761
query77	786	362	288	288
query78	9953	10150	9307	9307
query79	2437	821	597	597
query80	647	527	448	448
query81	495	276	241	241
query82	668	125	97	97
query83	177	175	154	154
query84	236	93	73	73
query85	779	385	302	302
query86	344	310	272	272
query87	4405	4521	4444	4444
query88	3461	2180	2223	2180
query89	397	314	286	286
query90	1946	197	195	195
query91	141	142	115	115
query92	73	61	59	59
query93	1539	1025	575	575
query94	665	381	311	311
query95	356	266	261	261
query96	496	561	271	271
query97	3317	3432	3244	3244
query98	229	209	201	201
query99	1476	1406	1285	1285
Total cold run time: 273259 ms
Total hot run time: 185169 ms
```
</details>

author_association: NONE
user: login: doris-robot
created_at: 2025-03-03T15:58:52Z
body: 
<details>
<summary>ClickBench: <b>Total hot run time: 31.13 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 e50780cf14c96ed91d3b41fa100479f0b625fc2d, data reload: false

query1	0.03	0.04	0.03
query2	0.07	0.03	0.03
query3	0.24	0.08	0.06
query4	1.61	0.10	0.10
query5	0.55	0.54	0.55
query6	1.18	0.71	0.73
query7	0.02	0.02	0.01
query8	0.04	0.03	0.03
query9	0.59	0.54	0.52
query10	0.57	0.57	0.58
query11	0.15	0.10	0.10
query12	0.14	0.12	0.11
query13	0.61	0.61	0.60
query14	2.68	2.82	2.75
query15	0.93	0.84	0.85
query16	0.38	0.38	0.37
query17	1.04	0.99	1.05
query18	0.21	0.19	0.20
query19	1.92	1.79	1.97
query20	0.02	0.01	0.02
query21	15.36	0.93	0.57
query22	0.78	1.25	0.68
query23	14.84	1.38	0.57
query24	6.88	1.22	1.07
query25	0.52	0.27	0.19
query26	0.52	0.16	0.14
query27	0.05	0.05	0.05
query28	10.29	0.89	0.43
query29	12.56	3.89	3.24
query30	0.24	0.09	0.06
query31	2.81	0.60	0.39
query32	3.23	0.54	0.46
query33	2.98	3.10	3.01
query34	15.83	5.15	4.58
query35	4.51	4.56	4.58
query36	0.66	0.50	0.48
query37	0.10	0.06	0.06
query38	0.05	0.04	0.03
query39	0.04	0.02	0.02
query40	0.17	0.13	0.12
query41	0.08	0.03	0.02
query42	0.03	0.02	0.02
query43	0.03	0.04	0.03
Total cold run time: 105.54 s
Total hot run time: 31.13 s
```
</details>

author_association: NONE
user: login: xiedeyantu
created_at: 2025-03-03T21:21:45Z
body: run p0
author_association: MEMBER
user: login: github-actions[bot]
created_at: 2025-03-04T02:04:21Z
body: PR approved by at least one committer and no changes requested.
author_association: CONTRIBUTOR
user: login: github-actions[bot]
created_at: 2025-03-04T02:04:23Z
body: PR approved by anyone and no changes requested.
author_association: CONTRIBUTOR
user: login: xiedeyantu
created_at: 2025-03-04T04:20:31Z
body: run buildall
author_association: MEMBER
user: login: doris-robot
created_at: 2025-03-04T05:28:37Z
body: 
<details>
<summary>TPC-H: <b>Total hot run time: 32177 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 a28cf827b1ce503c906d297e83d33f48fa4bd678, data reload: false

------ Round 1 ----------------------------------
q1	17695	5395	5305	5305
q2	2054	297	168	168
q3	10481	1305	743	743
q4	10224	1045	538	538
q5	7598	2450	2372	2372
q6	194	168	133	133
q7	909	753	602	602
q8	9298	1294	1189	1189
q9	5043	4769	4706	4706
q10	6828	2309	1940	1940
q11	479	275	252	252
q12	352	358	222	222
q13	17758	3657	3096	3096
q14	227	224	204	204
q15	504	459	464	459
q16	623	615	583	583
q17	572	890	359	359
q18	7010	6322	6254	6254
q19	1395	961	551	551
q20	310	330	200	200
q21	2912	2251	1984	1984
q22	376	333	317	317
Total cold run time: 102842 ms
Total hot run time: 32177 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5156	5128	5178	5128
q2	241	338	236	236
q3	2130	2730	2293	2293
q4	1441	1858	1428	1428
q5	4270	4151	4164	4151
q6	207	166	123	123
q7	1888	1836	1776	1776
q8	2656	2585	2615	2585
q9	7280	7124	7270	7124
q10	2983	3189	2786	2786
q11	571	506	489	489
q12	724	782	597	597
q13	3529	3857	3240	3240
q14	291	295	268	268
q15	511	462	470	462
q16	690	676	655	655
q17	1155	1671	1310	1310
q18	7597	7424	7223	7223
q19	832	794	904	794
q20	1942	2024	1904	1904
q21	5505	4875	4894	4875
q22	635	588	531	531
Total cold run time: 52234 ms
Total hot run time: 49978 ms
```
</details>

author_association: NONE
user: login: doris-robot
created_at: 2025-03-04T05:40:04Z
body: 
<details>
<summary>TPC-DS: <b>Total hot run time: 184248 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 a28cf827b1ce503c906d297e83d33f48fa4bd678, data reload: false

query1	977	387	392	387
query2	6539	1849	1857	1849
query3	6800	208	208	208
query4	26318	23686	23372	23372
query5	4314	647	484	484
query6	299	207	185	185
query7	4604	493	304	304
query8	298	243	229	229
query9	8598	2561	2570	2561
query10	480	320	276	276
query11	15382	15099	14878	14878
query12	154	103	102	102
query13	1653	524	381	381
query14	9166	6673	6916	6673
query15	220	189	173	173
query16	7408	656	487	487
query17	1179	687	529	529
query18	1945	390	313	313
query19	185	180	150	150
query20	118	119	114	114
query21	226	122	100	100
query22	4168	4342	3995	3995
query23	33841	32929	32773	32773
query24	7748	2383	2366	2366
query25	522	463	375	375
query26	1220	266	153	153
query27	2126	500	327	327
query28	4017	2427	2397	2397
query29	736	532	426	426
query30	236	182	160	160
query31	924	833	794	794
query32	73	65	62	62
query33	556	377	309	309
query34	791	853	513	513
query35	791	822	763	763
query36	977	976	902	902
query37	118	99	79	79
query38	4322	4033	4162	4033
query39	1437	1404	1382	1382
query40	206	120	109	109
query41	58	56	58	56
query42	125	108	108	108
query43	493	502	473	473
query44	1327	809	804	804
query45	182	172	168	168
query46	863	1043	671	671
query47	1742	1773	1719	1719
query48	373	418	321	321
query49	814	538	439	439
query50	690	728	425	425
query51	4171	4236	4085	4085
query52	104	109	98	98
query53	246	268	195	195
query54	513	531	411	411
query55	85	78	78	78
query56	274	251	252	251
query57	1121	1142	1034	1034
query58	248	233	240	233
query59	2691	2610	2789	2610
query60	288	280	264	264
query61	120	116	136	116
query62	813	736	667	667
query63	229	191	198	191
query64	4264	998	700	700
query65	3271	3100	3114	3100
query66	1125	410	310	310
query67	15774	15428	15248	15248
query68	8497	914	511	511
query69	463	297	257	257
query70	1212	1132	1120	1120
query71	456	308	257	257
query72	5309	3559	3770	3559
query73	797	730	361	361
query74	9118	9103	9089	9089
query75	3915	3199	2688	2688
query76	3666	1173	736	736
query77	776	405	270	270
query78	9936	10250	9236	9236
query79	1630	901	591	591
query80	832	524	440	440
query81	482	272	239	239
query82	266	122	102	102
query83	213	185	163	163
query84	279	90	74	74
query85	744	360	371	360
query86	337	302	277	277
query87	4388	4521	4446	4446
query88	2898	2250	2234	2234
query89	395	330	293	293
query90	2058	195	197	195
query91	133	135	108	108
query92	77	64	57	57
query93	1201	1059	589	589
query94	670	407	300	300
query95	357	271	260	260
query96	488	572	267	267
query97	3285	3388	3253	3253
query98	224	207	195	195
query99	1452	1390	1273	1273
Total cold run time: 270230 ms
Total hot run time: 184248 ms
```
</details>

author_association: NONE
user: login: doris-robot
created_at: 2025-03-04T05:45:22Z
body: 
<details>
<summary>ClickBench: <b>Total hot run time: 30.83 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 a28cf827b1ce503c906d297e83d33f48fa4bd678, data reload: false

query1	0.03	0.03	0.04
query2	0.06	0.04	0.03
query3	0.24	0.07	0.07
query4	1.61	0.10	0.10
query5	0.57	0.55	0.54
query6	1.18	0.72	0.72
query7	0.02	0.01	0.01
query8	0.04	0.03	0.03
query9	0.57	0.55	0.52
query10	0.57	0.58	0.57
query11	0.16	0.11	0.12
query12	0.15	0.11	0.11
query13	0.62	0.60	0.60
query14	2.82	2.72	2.82
query15	0.94	0.84	0.83
query16	0.39	0.39	0.38
query17	1.01	1.06	1.03
query18	0.21	0.20	0.20
query19	1.88	1.76	1.97
query20	0.01	0.01	0.02
query21	15.38	0.91	0.55
query22	0.77	1.23	0.61
query23	14.95	1.38	0.65
query24	6.83	1.64	0.76
query25	0.48	0.34	0.09
query26	0.54	0.17	0.13
query27	0.05	0.04	0.04
query28	10.06	0.90	0.45
query29	12.57	4.00	3.32
query30	0.25	0.10	0.06
query31	2.82	0.58	0.40
query32	3.23	0.54	0.47
query33	3.06	3.12	3.11
query34	15.64	5.16	4.48
query35	4.54	4.59	4.53
query36	0.67	0.49	0.49
query37	0.09	0.07	0.06
query38	0.05	0.04	0.03
query39	0.04	0.02	0.03
query40	0.16	0.13	0.14
query41	0.08	0.03	0.03
query42	0.04	0.02	0.03
query43	0.04	0.03	0.03
Total cold run time: 105.42 s
Total hot run time: 30.83 s
```
</details>

author_association: NONE
user: login: xiedeyantu
created_at: 2025-03-04T11:23:15Z
body: @LiBinfeng-01 ci finished
author_association: MEMBER
user: login: github-actions[bot]
created_at: 2025-03-05T02:40:52Z
body: PR approved by at least one committer and no changes requested.
author_association: CONTRIBUTOR