Skip to content

Commit 72636a0

Browse files
authored
[Chore](nereids) Remove DropEncryptKeyStmt (apache#54245)
1 parent c98bd9f commit 72636a0

File tree

4 files changed

+0
-89
lines changed

4 files changed

+0
-89
lines changed

fe/fe-core/src/main/cup/sql_parser.cup

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2619,10 +2619,6 @@ drop_stmt ::=
26192619
{:
26202620
RESULT = new DropWorkloadSchedPolicyStmt(ifExists, policyName);
26212621
:}
2622-
| KW_DROP KW_ENCRYPTKEY opt_if_exists:ifExists encryptkey_name:keyName
2623-
{:
2624-
RESULT = new DropEncryptKeyStmt(ifExists, keyName);
2625-
:}
26262622
| KW_DROP KW_SQL_BLOCK_RULE opt_if_exists:ifExists ident_list:ruleNames
26272623
{:
26282624
RESULT = new DropSqlBlockRuleStmt(ifExists, ruleNames);

fe/fe-core/src/main/java/org/apache/doris/analysis/DropEncryptKeyStmt.java

Lines changed: 0 additions & 75 deletions
This file was deleted.

fe/fe-core/src/main/java/org/apache/doris/catalog/EncryptKeyHelper.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
package org.apache.doris.catalog;
1919

2020
import org.apache.doris.analysis.CreateEncryptKeyStmt;
21-
import org.apache.doris.analysis.DropEncryptKeyStmt;
2221
import org.apache.doris.analysis.EncryptKeyName;
2322
import org.apache.doris.common.MetaNotFoundException;
2423
import org.apache.doris.common.UserException;
@@ -48,12 +47,6 @@ public static void replayCreateEncryptKey(EncryptKey encryptKey) throws MetaNotF
4847
db.replayAddEncryptKey(encryptKey);
4948
}
5049

51-
public static void dropEncryptKey(DropEncryptKeyStmt stmt) throws UserException {
52-
EncryptKeyName name = stmt.getEncryptKeyName();
53-
Database db = Env.getCurrentInternalCatalog().getDbOrDdlException(name.getDb());
54-
db.dropEncryptKey(stmt.getEncryptKeysSearchDesc(), stmt.isIfExists());
55-
}
56-
5750
public static void replayDropEncryptKey(EncryptKeySearchDesc encryptKeySearchDesc) throws MetaNotFoundException {
5851
String dbName = encryptKeySearchDesc.getKeyEncryptKeyName().getDb();
5952
Database db = Env.getCurrentInternalCatalog().getDbOrMetaException(dbName);

fe/fe-core/src/main/java/org/apache/doris/qe/DdlExecutor.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
import org.apache.doris.analysis.CreateWorkloadSchedPolicyStmt;
4242
import org.apache.doris.analysis.DdlStmt;
4343
import org.apache.doris.analysis.DropCatalogStmt;
44-
import org.apache.doris.analysis.DropEncryptKeyStmt;
4544
import org.apache.doris.analysis.DropFunctionStmt;
4645
import org.apache.doris.analysis.DropIndexPolicyStmt;
4746
import org.apache.doris.analysis.DropRepositoryStmt;
@@ -95,8 +94,6 @@ public static void execute(Env env, DdlStmt ddlStmt) throws Exception {
9594
env.dropFunction((DropFunctionStmt) ddlStmt);
9695
} else if (ddlStmt instanceof CreateEncryptKeyStmt) {
9796
EncryptKeyHelper.createEncryptKey((CreateEncryptKeyStmt) ddlStmt);
98-
} else if (ddlStmt instanceof DropEncryptKeyStmt) {
99-
EncryptKeyHelper.dropEncryptKey((DropEncryptKeyStmt) ddlStmt);
10097
} else if (ddlStmt instanceof CreateTableStmt) {
10198
env.createTable((CreateTableStmt) ddlStmt);
10299
} else if (ddlStmt instanceof DropTableStmt) {

0 commit comments

Comments
 (0)