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

starocean999 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 6fdac301c18 [Chore](nereids) Remove CleanLabelStmt (#53820)
6fdac301c18 is described below

commit 6fdac301c18430d37edde096f796b08072d51af5
Author: csding <[email protected]>
AuthorDate: Thu Jul 24 16:31:23 2025 +0800

    [Chore](nereids) Remove CleanLabelStmt (#53820)
---
 fe/fe-core/src/main/cup/sql_parser.cup             | 10 +--
 .../org/apache/doris/analysis/CleanLabelStmt.java  | 76 ----------------------
 .../main/java/org/apache/doris/qe/DdlExecutor.java |  3 -
 3 files changed, 1 insertion(+), 88 deletions(-)

diff --git a/fe/fe-core/src/main/cup/sql_parser.cup 
b/fe/fe-core/src/main/cup/sql_parser.cup
index 187c7521558..c7c5d903159 100644
--- a/fe/fe-core/src/main/cup/sql_parser.cup
+++ b/fe/fe-core/src/main/cup/sql_parser.cup
@@ -1240,15 +1240,7 @@ refresh_stmt ::=
     ;
 
 clean_stmt ::=
-    KW_CLEAN KW_LABEL from_or_in ident:db
-    {:
-        RESULT = new CleanLabelStmt(db, null);
-    :}
-    | KW_CLEAN KW_LABEL ident:label from_or_in ident:db
-    {:
-        RESULT = new CleanLabelStmt(db, label);
-    :}
-    | KW_CLEAN KW_ALL KW_PROFILE
+    KW_CLEAN KW_ALL KW_PROFILE
     {:
         RESULT = new CleanProfileStmt();
     :}
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/analysis/CleanLabelStmt.java 
b/fe/fe-core/src/main/java/org/apache/doris/analysis/CleanLabelStmt.java
deleted file mode 100644
index 8f4b63dcd95..00000000000
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/CleanLabelStmt.java
+++ /dev/null
@@ -1,76 +0,0 @@
-// 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.Env;
-import org.apache.doris.common.ErrorCode;
-import org.apache.doris.common.ErrorReport;
-import org.apache.doris.common.UserException;
-import org.apache.doris.datasource.InternalCatalog;
-import org.apache.doris.mysql.privilege.PrivPredicate;
-import org.apache.doris.qe.ConnectContext;
-
-import com.google.common.base.Strings;
-
-/**
- * CLEAN LABEL FROM db;
- * CLEAN LABEL my_label FROM db;
- */
-public class CleanLabelStmt extends DdlStmt implements NotFallbackInParser {
-    private String db;
-    private String label;
-
-    public CleanLabelStmt(String db, String label) {
-        this.db = db;
-        this.label = label;
-    }
-
-    public String getDb() {
-        return db;
-    }
-
-    public String getLabel() {
-        return label;
-    }
-
-    @Override
-    public void analyze() throws UserException {
-        super.analyze();
-        label = Strings.nullToEmpty(label);
-        // check auth
-        if (!Env.getCurrentEnv().getAccessManager()
-                .checkDbPriv(ConnectContext.get(), 
InternalCatalog.INTERNAL_CATALOG_NAME, db, PrivPredicate.LOAD)) {
-            
ErrorReport.reportAnalysisException(ErrorCode.ERR_SPECIFIC_ACCESS_DENIED_ERROR, 
"LOAD");
-        }
-    }
-
-    @Override
-    public String toSql() {
-        return "CLEAN LABEL" + (Strings.isNullOrEmpty(label) ? " " : " " + 
label) + " FROM " + db;
-    }
-
-    @Override
-    public RedirectStatus getRedirectStatus() {
-        return RedirectStatus.FORWARD_WITH_SYNC;
-    }
-
-    @Override
-    public StmtType stmtType() {
-        return StmtType.CLEAN;
-    }
-}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/DdlExecutor.java 
b/fe/fe-core/src/main/java/org/apache/doris/qe/DdlExecutor.java
index 730c8a4b1e8..929a7410d16 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/DdlExecutor.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/DdlExecutor.java
@@ -28,7 +28,6 @@ import org.apache.doris.analysis.AlterWorkloadGroupStmt;
 import org.apache.doris.analysis.AlterWorkloadSchedPolicyStmt;
 import org.apache.doris.analysis.CancelExportStmt;
 import org.apache.doris.analysis.CancelLoadStmt;
-import org.apache.doris.analysis.CleanLabelStmt;
 import org.apache.doris.analysis.CleanProfileStmt;
 import org.apache.doris.analysis.CopyStmt;
 import org.apache.doris.analysis.CreateCatalogStmt;
@@ -202,8 +201,6 @@ public class DdlExecutor {
             env.getCatalogMgr().createCatalog((CreateCatalogStmt) ddlStmt);
         } else if (ddlStmt instanceof DropCatalogStmt) {
             env.getCatalogMgr().dropCatalog((DropCatalogStmt) ddlStmt);
-        } else if (ddlStmt instanceof CleanLabelStmt) {
-            env.getLoadManager().cleanLabel(((CleanLabelStmt) 
ddlStmt).getDb(), ((CleanLabelStmt) ddlStmt).getLabel());
         } else if (ddlStmt instanceof RefreshCatalogStmt) {
             RefreshCatalogStmt refreshCatalogStmt = (RefreshCatalogStmt) 
ddlStmt;
             env.getRefreshManager()


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to