You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "yangzhg (via GitHub)" <gi...@apache.org> on 2023/04/19 02:37:01 UTC

[GitHub] [doris] yangzhg opened a new pull request, #18805: [Feature] Collect the information statistics of the query hit

yangzhg opened a new pull request, #18805:
URL: https://github.com/apache/doris/pull/18805

   # Proposed changes
   
   Issue Number: close #18097
   
   ## Problem summary
   
   ref #18097
   
   ## Checklist(Required)
   
   * [ ] Does it affect the original behavior
   * [ ] Has unit tests been added
   * [x] Has document been added or modified
   * [ ] Does it need to update dependencies
   * [ ] Is this PR support rollback (If NO, please explain WHY)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1543250896

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] yangzhg commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "yangzhg (via GitHub)" <gi...@apache.org>.
yangzhg commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1543622646

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1539779392

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] yangzhg commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "yangzhg (via GitHub)" <gi...@apache.org>.
yangzhg commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1515643027

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1541202530

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1541343074

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] yangzhg commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "yangzhg (via GitHub)" <gi...@apache.org>.
yangzhg commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1541341569

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] xy720 commented on a diff in pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "xy720 (via GitHub)" <gi...@apache.org>.
xy720 commented on code in PR #18805:
URL: https://github.com/apache/doris/pull/18805#discussion_r1184861438


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/CleanQueryStatsStmt.java:
##########
@@ -0,0 +1,149 @@
+// 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.analysis;
+
+import org.apache.doris.catalog.DatabaseIf;
+import org.apache.doris.catalog.Env;
+import org.apache.doris.cluster.ClusterNamespace;
+import org.apache.doris.common.ErrorCode;
+import org.apache.doris.common.ErrorReport;
+import org.apache.doris.common.UserException;
+import org.apache.doris.mysql.privilege.PrivPredicate;
+import org.apache.doris.qe.ConnectContext;
+import org.apache.doris.system.SystemInfoService;
+
+import org.apache.commons.lang3.StringUtils;
+
+/**
+ * CLEAN ALL QUERY STATS;
+ * CLEAN DATABASE QUERY STATS FROM db;
+ * CLEAN TABLE QUERY STATS FROM db.table;
+ */
+public class CleanQueryStatsStmt extends DdlStmt {
+    private String dbName;
+    private TableName tableName;
+    private Scope scope;
+
+    /**
+     * CLEAN DATABASE QUERY STATS FROM db;
+     */
+    public CleanQueryStatsStmt(String dbName, Scope scope) {
+        this.dbName = dbName;
+        this.tableName = null;
+        this.scope = scope;
+    }
+
+    /**
+     * CLEAN TABLE QUERY STATS FROM db.table;
+     */
+    public CleanQueryStatsStmt(TableName tableName, Scope scope) {
+        this.dbName = null;
+        this.tableName = tableName;
+        this.scope = scope;
+    }
+
+    public CleanQueryStatsStmt() {
+        this.scope = Scope.ALL;
+        this.tableName = null;
+        this.dbName = null;
+    }
+
+    public String getDbName() {
+        return dbName;
+    }
+
+    public TableName getTableName() {
+        return tableName;
+    }
+
+    public Scope getScope() {
+        return scope;
+    }
+
+    @Override
+    public void analyze(Analyzer analyzer) throws UserException {
+        super.analyze(analyzer);
+        switch (scope) {
+            case ALL:
+                if (!Env.getCurrentEnv().getAccessManager()
+                        .checkGlobalPriv(ConnectContext.get(), PrivPredicate.ADMIN)) {
+                    ErrorReport.reportAnalysisException(ErrorCode.ERR_SPECIFIC_ACCESS_DENIED_ERROR,
+                            "CLEAN ALL QUERY STATS");
+                }
+                break;
+            case DB:
+                if (StringUtils.isEmpty(dbName)) {
+                    dbName = analyzer.getDefaultDb();
+                }
+                if (StringUtils.isEmpty(dbName)) {
+                    ErrorReport.reportAnalysisException(ErrorCode.ERR_NO_DB_ERROR);
+                }
+                dbName = ClusterNamespace.getFullName(SystemInfoService.DEFAULT_CLUSTER, dbName);
+
+                Env.getCurrentEnv().getCurrentCatalog().getDbOrAnalysisException(dbName);
+                if (!Env.getCurrentEnv().getAccessManager()
+                        .checkDbPriv(ConnectContext.get(), dbName, PrivPredicate.ALTER)) {
+                    ErrorReport.reportAnalysisException(ErrorCode.ERR_SPECIFIC_ACCESS_DENIED_ERROR,
+                            "CLEAN DATABASE QUERY STATS FOR " + ClusterNamespace.getNameFromFullName(dbName));
+                }
+                break;
+            case TABLE:
+                tableName.analyze(analyzer);
+                dbName = tableName.getDb();
+                if (StringUtils.isEmpty(dbName)) {
+                    ErrorReport.reportAnalysisException(ErrorCode.ERR_NO_DB_ERROR);
+                }
+                DatabaseIf db = Env.getCurrentEnv().getCurrentCatalog().getDbOrAnalysisException(dbName);
+                db.getTableOrAnalysisException(tableName.getTbl());
+                if (!Env.getCurrentEnv().getAccessManager()
+                        .checkTblPriv(ConnectContext.get(), dbName, tableName.getTbl(), PrivPredicate.ALTER)) {
+                    ErrorReport.reportAnalysisException(ErrorCode.ERR_SPECIFIC_ACCESS_DENIED_ERROR,
+                            "CLEAN TABLE QUERY STATS FROM " + tableName);
+                }
+                break;
+            default:
+                throw new IllegalStateException("Unexpected value: " + scope);
+        }
+    }
+
+    @Override
+    public String toSql() {
+        switch (scope) {
+            case ALL:
+                return "CLEAN ALL QUERY STATS";
+            case DB:
+                return "CLEAN DATABASE QUERY STATS FOR " + dbName;
+            case TABLE:
+                return "CLEAN TABLE QUERY STATS FROM " + tableName;
+            default:
+                throw new IllegalStateException("Unexpected value: " + scope);
+        }
+    }
+
+    @Override
+    public RedirectStatus getRedirectStatus() {
+        return RedirectStatus.NO_FORWARD;

Review Comment:
   it may caused the HitCount of every FE to be different?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] yangzhg commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "yangzhg (via GitHub)" <gi...@apache.org>.
yangzhg commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1535604019

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1541306159

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1539916819

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1537976727

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] yangzhg commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "yangzhg (via GitHub)" <gi...@apache.org>.
yangzhg commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1541380625

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1537113868

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] yangzhg commented on pull request #18805: [Feature] Collect the information statistics of the query hit

Posted by "yangzhg (via GitHub)" <gi...@apache.org>.
yangzhg commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1514051340

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] yangzhg commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "yangzhg (via GitHub)" <gi...@apache.org>.
yangzhg commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1542080222

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1541229635

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1542083367

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1543269929

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1545157866

   PR approved by at least one committer and no changes requested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1543447060

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] yangzhg commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "yangzhg (via GitHub)" <gi...@apache.org>.
yangzhg commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1514061037

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1537119101

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1539639385

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] yangzhg commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "yangzhg (via GitHub)" <gi...@apache.org>.
yangzhg commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1539299467

   run p0


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] yangzhg commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "yangzhg (via GitHub)" <gi...@apache.org>.
yangzhg commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1526929663

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1537120530

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1537119091

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1537924983

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] yangzhg merged pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "yangzhg (via GitHub)" <gi...@apache.org>.
yangzhg merged PR #18805:
URL: https://github.com/apache/doris/pull/18805


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] hello-stephen commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1514129036

   TeamCity pipeline, clickbench performance test result:
    the sum of best hot time: 34.03 seconds
    stream load tsv:          431 seconds loaded 74807831229 Bytes, about 165 MB/s
    stream load json:         24 seconds loaded 2358488459 Bytes, about 93 MB/s
    stream load orc:          59 seconds loaded 1101869774 Bytes, about 17 MB/s
    stream load parquet:          31 seconds loaded 861443392 Bytes, about 26 MB/s
    https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230419045423_clickbench_pr_130887.html


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] yangzhg commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "yangzhg (via GitHub)" <gi...@apache.org>.
yangzhg commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1514116704

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] yangzhg commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "yangzhg (via GitHub)" <gi...@apache.org>.
yangzhg commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1519296806

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1541546455

   PR approved by at least one committer and no changes requested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1541546459

   PR approved by at least one committer and no changes requested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1543254853

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1543443765

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1537119743

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1537121251

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1537918380

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1537115704

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1538048642

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] yangzhg commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "yangzhg (via GitHub)" <gi...@apache.org>.
yangzhg commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1514358457

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] xy720 commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "xy720 (via GitHub)" <gi...@apache.org>.
xy720 commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1534654988

   There may be some suggestion is helpful:
   1、Find a way to unify the query stats for each FE.
   2、Provide a time window for users to show the increments of a specific time period.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1537949626

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1538016465

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1541546520

   PR approved by anyone and no changes requested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1537110199

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1539926312

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] yangzhg commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "yangzhg (via GitHub)" <gi...@apache.org>.
yangzhg commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1539922420

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] yangzhg commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "yangzhg (via GitHub)" <gi...@apache.org>.
yangzhg commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1515669716

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] yangzhg commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "yangzhg (via GitHub)" <gi...@apache.org>.
yangzhg commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1515861693

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] xy720 commented on a diff in pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "xy720 (via GitHub)" <gi...@apache.org>.
xy720 commented on code in PR #18805:
URL: https://github.com/apache/doris/pull/18805#discussion_r1189507021


##########
fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/QueryStatsAction.java:
##########
@@ -0,0 +1,292 @@
+// 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.httpv2.rest;
+
+import org.apache.doris.catalog.Env;
+import org.apache.doris.cluster.ClusterNamespace;
+import org.apache.doris.datasource.InternalCatalog;
+import org.apache.doris.httpv2.entity.ResponseEntityBuilder;
+import org.apache.doris.mysql.privilege.PrivPredicate;
+import org.apache.doris.qe.ConnectContext;
+import org.apache.doris.system.SystemInfoService;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.json.simple.JSONArray;
+import org.json.simple.JSONObject;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.function.BiFunction;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * This class is used to get query stats or clear query stats.
+ */
+@RestController
+public class QueryStatsAction extends RestBaseController {
+    private static final Logger LOG = LogManager.getLogger(QueryStatsAction.class);
+
+    @RequestMapping(path = "/api/query_stats/{catalog}", method = RequestMethod.GET)
+    protected Object getQueryStatsFromCatalog(@PathVariable("catalog") String catalog,
+            @RequestParam(name = "summary", required = false, defaultValue = "true") boolean summary,
+            @RequestParam(name = "pretty", required = false, defaultValue = "false") boolean pretty,
+            HttpServletRequest request, HttpServletResponse response) {
+        if (pretty && summary) {
+            return ResponseEntityBuilder.badRequest("pretty and summary can not be true at the same time");
+        }
+        executeCheckPassword(request, response);
+        checkGlobalAuth(ConnectContext.get().getCurrentUserIdentity(), PrivPredicate.ADMIN);
+        // use NS_KEY as catalog, but NS_KEY's default value is 'default_cluster'.
+        if (catalog.equalsIgnoreCase(SystemInfoService.DEFAULT_CLUSTER)) {
+            catalog = InternalCatalog.INTERNAL_CATALOG_NAME;
+        }
+        try {
+            Map<String, Map> result = Env.getCurrentEnv().getQueryStats().getStats(catalog, summary);
+            if (pretty) {
+                return ResponseEntityBuilder.ok(getPrettyJson(result.get("detail"), QueryStatsType.DATABASE));
+            }
+            return ResponseEntityBuilder.ok(result);
+        } catch (Exception e) {
+            LOG.warn("get query stats from catalog {} failed", catalog, e);
+            return ResponseEntityBuilder.internalError(e.getMessage());
+        }
+    }
+
+    @RequestMapping(path = "/api/query_stats/{catalog}/{database}", method = RequestMethod.GET)
+    protected Object getQueryStatsFromDatabase(@PathVariable("catalog") String catalog,
+            @PathVariable("database") String database,
+            @RequestParam(name = "summary", required = false, defaultValue = "true") boolean summary,
+            @RequestParam(name = "pretty", required = false, defaultValue = "false") boolean pretty,
+            HttpServletRequest request, HttpServletResponse response) {
+        if (pretty && summary) {
+            return ResponseEntityBuilder.badRequest("pretty and summary can not be true at the same time");
+        }
+        executeCheckPassword(request, response);
+        checkDbAuth(ConnectContext.get().getCurrentUserIdentity(), database, PrivPredicate.SHOW);
+        // use NS_KEY as catalog, but NS_KEY's default value is 'default_cluster'.
+        String clasterName = catalog;
+        if (catalog.equalsIgnoreCase(SystemInfoService.DEFAULT_CLUSTER)) {
+            catalog = InternalCatalog.INTERNAL_CATALOG_NAME;
+        }
+        database = ClusterNamespace.getFullName(clasterName, database);
+        try {
+            Map<String, Map> result = Env.getCurrentEnv().getQueryStats().getStats(catalog, database, summary);

Review Comment:
   May be we should unify the action and show stmt in later pr.
   The action should also get merged stat from each FE.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1543042630

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1539625102

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1541382785

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] xy720 commented on a diff in pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "xy720 (via GitHub)" <gi...@apache.org>.
xy720 commented on code in PR #18805:
URL: https://github.com/apache/doris/pull/18805#discussion_r1184845289


##########
docs/zh-CN/docs/sql-manual/sql-reference/Show-Statements/SHOW-QUERY-STATS.md:
##########
@@ -0,0 +1,196 @@
+---
+{
+    "title": "SHOW-QUERY-STATS",
+    "language": "zh-CN"
+}
+
+---
+
+<!--
+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.
+-->
+
+## SHOW-QUERY-STATS
+
+
+### Name
+<version since="dev">
+SHOW QUERY STATS
+</version>
+
+### Description
+
+该语句用于展示数据库中历史查询命中的库表列的情况
+
+```sql
+SHOW QUERY STATS [[FOR db_name]|[FROM table_name]] [ALL] [VERBOSE]];
+```
+
+说明:
+
+1. 支持查询数据库和表的历史查询命中情况,重启fe后数据会重置,每个fe单独统计
+2. 通过 FROM DATABASE 和FROM TABLE 可以指定查询数据库或者表的命中情况,后面分别接数据库名或者表名
+3. ALL 可以指定是否展示所有index的查询命中情况,VERBOSE 可以展示更详细的命中情况, 这两个参数可以单独使用,
+   也可以一起使用,但是必须放在最后 而且只能用在表的查询上
+4. 如果没有use 任何数据库那么直接执行`SHOW QUERY STATS` 将展示所有数据库的命中情况

Review Comment:
   ```suggestion
   4. 如果没有 use 任何数据库那么直接执行`SHOW QUERY STATS` 将展示所有数据库的命中情况
   ```



##########
docs/zh-CN/docs/sql-manual/sql-reference/Show-Statements/SHOW-QUERY-STATS.md:
##########
@@ -0,0 +1,196 @@
+---
+{
+    "title": "SHOW-QUERY-STATS",
+    "language": "zh-CN"
+}
+
+---
+
+<!--
+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.
+-->
+
+## SHOW-QUERY-STATS
+
+
+### Name
+<version since="dev">
+SHOW QUERY STATS
+</version>
+
+### Description
+
+该语句用于展示数据库中历史查询命中的库表列的情况
+
+```sql
+SHOW QUERY STATS [[FOR db_name]|[FROM table_name]] [ALL] [VERBOSE]];
+```
+
+说明:
+
+1. 支持查询数据库和表的历史查询命中情况,重启fe后数据会重置,每个fe单独统计
+2. 通过 FROM DATABASE 和FROM TABLE 可以指定查询数据库或者表的命中情况,后面分别接数据库名或者表名

Review Comment:
   ```suggestion
   2. 通过 FOR DATABASE 和 FROM TABLE 可以指定查询数据库或者表的命中情况,后面分别接数据库名或者表名
   ```



##########
docs/zh-CN/docs/sql-manual/sql-reference/Utility-Statements/CLEAN-QUERY-STATS.md:
##########
@@ -0,0 +1,75 @@
+---
+{
+    "title": "CLEAN-QUERY-STATS",
+    "language": "zh-CN"
+}
+---
+
+<!--
+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.
+-->
+
+## CLEAN-QUERY-STATS
+
+### Name
+
+<version since="dev">
+CLEAN QUERY STATS
+</version>
+
+### Description
+
+该语句用请空查询统计信息
+
+语法:
+
+```sql
+CLEAN [ALL| DATABASE | TABLE] QUERY STATS [[FOR db_name]|[FROM|IN] table_name]];
+```
+
+说明:
+

Review Comment:
   may be here should tell user what kind of privilege is needed



##########
docs/zh-CN/docs/sql-manual/sql-reference/Show-Statements/SHOW-QUERY-STATS.md:
##########
@@ -0,0 +1,196 @@
+---
+{
+    "title": "SHOW-QUERY-STATS",
+    "language": "zh-CN"
+}
+
+---
+
+<!--
+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.
+-->
+
+## SHOW-QUERY-STATS
+
+
+### Name
+<version since="dev">
+SHOW QUERY STATS
+</version>
+
+### Description
+
+该语句用于展示数据库中历史查询命中的库表列的情况
+
+```sql
+SHOW QUERY STATS [[FOR db_name]|[FROM table_name]] [ALL] [VERBOSE]];
+```
+
+说明:
+
+1. 支持查询数据库和表的历史查询命中情况,重启fe后数据会重置,每个fe单独统计
+2. 通过 FROM DATABASE 和FROM TABLE 可以指定查询数据库或者表的命中情况,后面分别接数据库名或者表名
+3. ALL 可以指定是否展示所有index的查询命中情况,VERBOSE 可以展示更详细的命中情况, 这两个参数可以单独使用,
+   也可以一起使用,但是必须放在最后 而且只能用在表的查询上
+4. 如果没有use 任何数据库那么直接执行`SHOW QUERY STATS` 将展示所有数据库的命中情况
+5. 命中结果中可能有两列:
+   QueryCount:该列被查询次数
+   FilterCount: 该列作为where 条件被查询的次数
+### Example
+
+1. 展示表`baseall` 的查询命中情况
+
+   ```sql
+    MySQL [test_query_db]> show query stats from baseall;
+    +-------+------------+-------------+
+    | Field | QueryCount | FilterCount |
+    +-------+------------+-------------+
+    | k0    | 0          | 0           |
+    | k1    | 0          | 0           |
+    | k2    | 0          | 0           |
+    | k3    | 0          | 0           |
+    | k4    | 0          | 0           |
+    | k5    | 0          | 0           |
+    | k6    | 0          | 0           |
+    | k10   | 0          | 0           |
+    | k11   | 0          | 0           |
+    | k7    | 0          | 0           |
+    | k8    | 0          | 0           |
+    | k9    | 0          | 0           |
+    | k12   | 0          | 0           |
+    | k13   | 0          | 0           |
+    +-------+------------+-------------+
+    14 rows in set (0.002 sec)
+    
+    MySQL [test_query_db]> select k0, k1,k2, sum(k3) from baseall  where k9 > 1 group by k0,k1,k2;
+    +------+------+--------+-------------+
+    | k0   | k1   | k2     | sum(`k3`)   |
+    +------+------+--------+-------------+
+    |    0 |    6 |  32767 |        3021 |
+    |    1 |   12 |  32767 | -2147483647 |
+    |    0 |    3 |   1989 |        1002 |
+    |    0 |    7 | -32767 |        1002 |
+    |    1 |    8 |    255 |  2147483647 |
+    |    1 |    9 |   1991 | -2147483647 |
+    |    1 |   11 |   1989 |       25699 |
+    |    1 |   13 | -32767 |  2147483647 |
+    |    1 |   14 |    255 |         103 |
+    |    0 |    1 |   1989 |        1001 |
+    |    0 |    2 |   1986 |        1001 |
+    |    1 |   15 |   1992 |        3021 |
+    +------+------+--------+-------------+
+    12 rows in set (0.050 sec)
+    
+    MySQL [test_query_db]> show query stats from baseall;
+    +-------+------------+-------------+
+    | Field | QueryCount | FilterCount |
+    +-------+------------+-------------+
+    | k0    | 1          | 0           |
+    | k1    | 1          | 0           |
+    | k2    | 1          | 0           |
+    | k3    | 1          | 0           |
+    | k4    | 0          | 0           |
+    | k5    | 0          | 0           |
+    | k6    | 0          | 0           |
+    | k10   | 0          | 0           |
+    | k11   | 0          | 0           |
+    | k7    | 0          | 0           |
+    | k8    | 0          | 0           |
+    | k9    | 1          | 1           |
+    | k12   | 0          | 0           |
+    | k13   | 0          | 0           |
+    +-------+------------+-------------+
+    14 rows in set (0.001 sec)
+   ```
+
+2. 展示表的所物化视图的的命中的汇总情况
+
+   ```sql
+   MySQL [test_query_db]> show query stats from table baseall all;

Review Comment:
   ```suggestion
      MySQL [test_query_db]> show query stats from baseall all;
   ```



##########
fe/fe-core/src/main/java/org/apache/doris/analysis/CleanQueryStatsStmt.java:
##########
@@ -0,0 +1,149 @@
+// 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.analysis;
+
+import org.apache.doris.catalog.DatabaseIf;
+import org.apache.doris.catalog.Env;
+import org.apache.doris.cluster.ClusterNamespace;
+import org.apache.doris.common.ErrorCode;
+import org.apache.doris.common.ErrorReport;
+import org.apache.doris.common.UserException;
+import org.apache.doris.mysql.privilege.PrivPredicate;
+import org.apache.doris.qe.ConnectContext;
+import org.apache.doris.system.SystemInfoService;
+
+import org.apache.commons.lang3.StringUtils;
+
+/**
+ * CLEAN ALL QUERY STATS;
+ * CLEAN DATABASE QUERY STATS FROM db;
+ * CLEAN TABLE QUERY STATS FROM db.table;
+ */
+public class CleanQueryStatsStmt extends DdlStmt {
+    private String dbName;
+    private TableName tableName;
+    private Scope scope;
+
+    /**
+     * CLEAN DATABASE QUERY STATS FROM db;
+     */
+    public CleanQueryStatsStmt(String dbName, Scope scope) {
+        this.dbName = dbName;
+        this.tableName = null;
+        this.scope = scope;
+    }
+
+    /**
+     * CLEAN TABLE QUERY STATS FROM db.table;
+     */
+    public CleanQueryStatsStmt(TableName tableName, Scope scope) {
+        this.dbName = null;
+        this.tableName = tableName;
+        this.scope = scope;
+    }
+
+    public CleanQueryStatsStmt() {
+        this.scope = Scope.ALL;
+        this.tableName = null;
+        this.dbName = null;
+    }
+
+    public String getDbName() {
+        return dbName;
+    }
+
+    public TableName getTableName() {
+        return tableName;
+    }
+
+    public Scope getScope() {
+        return scope;
+    }
+
+    @Override
+    public void analyze(Analyzer analyzer) throws UserException {
+        super.analyze(analyzer);
+        switch (scope) {
+            case ALL:
+                if (!Env.getCurrentEnv().getAccessManager()
+                        .checkGlobalPriv(ConnectContext.get(), PrivPredicate.ADMIN)) {
+                    ErrorReport.reportAnalysisException(ErrorCode.ERR_SPECIFIC_ACCESS_DENIED_ERROR,
+                            "CLEAN ALL QUERY STATS");
+                }
+                break;
+            case DB:
+                if (StringUtils.isEmpty(dbName)) {
+                    dbName = analyzer.getDefaultDb();
+                }
+                if (StringUtils.isEmpty(dbName)) {
+                    ErrorReport.reportAnalysisException(ErrorCode.ERR_NO_DB_ERROR);
+                }
+                dbName = ClusterNamespace.getFullName(SystemInfoService.DEFAULT_CLUSTER, dbName);
+
+                Env.getCurrentEnv().getCurrentCatalog().getDbOrAnalysisException(dbName);
+                if (!Env.getCurrentEnv().getAccessManager()
+                        .checkDbPriv(ConnectContext.get(), dbName, PrivPredicate.ALTER)) {
+                    ErrorReport.reportAnalysisException(ErrorCode.ERR_SPECIFIC_ACCESS_DENIED_ERROR,
+                            "CLEAN DATABASE QUERY STATS FOR " + ClusterNamespace.getNameFromFullName(dbName));
+                }
+                break;
+            case TABLE:
+                tableName.analyze(analyzer);
+                dbName = tableName.getDb();
+                if (StringUtils.isEmpty(dbName)) {
+                    ErrorReport.reportAnalysisException(ErrorCode.ERR_NO_DB_ERROR);
+                }
+                DatabaseIf db = Env.getCurrentEnv().getCurrentCatalog().getDbOrAnalysisException(dbName);
+                db.getTableOrAnalysisException(tableName.getTbl());
+                if (!Env.getCurrentEnv().getAccessManager()
+                        .checkTblPriv(ConnectContext.get(), dbName, tableName.getTbl(), PrivPredicate.ALTER)) {
+                    ErrorReport.reportAnalysisException(ErrorCode.ERR_SPECIFIC_ACCESS_DENIED_ERROR,
+                            "CLEAN TABLE QUERY STATS FROM " + tableName);
+                }
+                break;
+            default:
+                throw new IllegalStateException("Unexpected value: " + scope);
+        }
+    }
+
+    @Override
+    public String toSql() {
+        switch (scope) {
+            case ALL:
+                return "CLEAN ALL QUERY STATS";
+            case DB:
+                return "CLEAN DATABASE QUERY STATS FOR " + dbName;
+            case TABLE:
+                return "CLEAN TABLE QUERY STATS FROM " + tableName;
+            default:
+                throw new IllegalStateException("Unexpected value: " + scope);
+        }
+    }
+
+    @Override
+    public RedirectStatus getRedirectStatus() {
+        return RedirectStatus.NO_FORWARD;

Review Comment:
   it may caused the HitCount of every FE to be different?



##########
docs/zh-CN/docs/sql-manual/sql-reference/Utility-Statements/CLEAN-QUERY-STATS.md:
##########
@@ -0,0 +1,75 @@
+---
+{
+    "title": "CLEAN-QUERY-STATS",
+    "language": "zh-CN"
+}
+---
+
+<!--
+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.
+-->
+
+## CLEAN-QUERY-STATS
+
+### Name
+
+<version since="dev">
+CLEAN QUERY STATS
+</version>
+
+### Description
+
+该语句用请空查询统计信息
+
+语法:
+
+```sql
+CLEAN [ALL| DATABASE | TABLE] QUERY STATS [[FOR db_name]|[FROM|IN] table_name]];
+```
+
+说明:
+
+1. 如果指定 ALL,则清空所有查询统计信息,包括数据库和表的
+2. 如果指定 DATABASE,则清空指定数据库的查询统计信息
+3. 如果指定 TABLE,则清空指定表的查询统计信息
+
+### Example
+
+1. 清空所有统计信息
+
+    ```sql
+    clean all query stats;
+    ```
+
+2. 清指定数据库的统计信息

Review Comment:
   ```suggestion
   2. 清空指定数据库的统计信息
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1537121855

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] yangzhg commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "yangzhg (via GitHub)" <gi...@apache.org>.
yangzhg commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1514199219

   run p0


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1537799291

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1539920184

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1541546523

   PR approved by anyone and no changes requested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1543322893

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] github-actions[bot] commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1543341439

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] yangzhg commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "yangzhg (via GitHub)" <gi...@apache.org>.
yangzhg commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1543278096

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] yangzhg commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "yangzhg (via GitHub)" <gi...@apache.org>.
yangzhg commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1543328379

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [doris] yangzhg commented on pull request #18805: [Feature](stat) Collect the information statistics of the query hit

Posted by "yangzhg (via GitHub)" <gi...@apache.org>.
yangzhg commented on PR #18805:
URL: https://github.com/apache/doris/pull/18805#issuecomment-1543354838

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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