You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2026/03/20 11:52:13 UTC

(shardingsphere) branch master updated: Support parsing Doris CLEAN PROFILE and PLAN REPLAYER PLAY syntax (#38487)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 5e02a475d9f Support parsing Doris CLEAN PROFILE and PLAN REPLAYER PLAY syntax (#38487)
5e02a475d9f is described below

commit 5e02a475d9f0211ef33aa42922d407807189bdd6
Author: cxy <xi...@qq.com>
AuthorDate: Fri Mar 20 19:52:07 2026 +0800

    Support parsing Doris CLEAN PROFILE and PLAN REPLAYER PLAY syntax (#38487)
    
    * Support parsing Doris CLEAN PROFILE and PLAN REPLAYER DUMP/PLAY syntax
    
    * Support parsing Doris CLEAN PROFILE and PLAN REPLAYER PLAY syntax
    
    * Support parsing Doris CLEAN PROFILE and PLAN REPLAYER PLAY syntax
---
 .../core/database/visitor/SQLVisitorRule.java      |  4 ++
 .../src/main/antlr4/imports/doris/BaseRule.g4      |  6 +++
 .../src/main/antlr4/imports/doris/DALStatement.g4  | 10 +++++
 .../src/main/antlr4/imports/doris/DorisKeyword.g4  | 16 ++++++++
 .../sql/parser/autogen/DorisStatement.g4           |  2 +
 .../statement/type/DorisDALStatementVisitor.java   | 14 +++++++
 .../type/DorisPlayKeywordIdentifierTest.java       | 46 ++++++++++++++++++++++
 .../doris/dal/DorisCleanAllProfileStatement.java   | 31 +++++++++++++++
 .../doris/dal/DorisPlanReplayerPlayStatement.java  | 36 +++++++++++++++++
 .../dal/dialect/doris/DorisDALStatementAssert.java | 10 +++++
 .../type/DorisCleanAllProfileStatementAssert.java  | 41 +++++++++++++++++++
 .../type/DorisPlanReplayerPlayStatementAssert.java | 45 +++++++++++++++++++++
 .../cases/parser/jaxb/RootSQLParserTestCases.java  |  8 ++++
 .../DorisCleanAllProfileStatementTestCase.java     | 26 ++++++++++++
 .../DorisPlanReplayerPlayStatementTestCase.java    | 38 ++++++++++++++++++
 .../main/resources/case/dal/clean-all-profile.xml  | 21 ++++++++++
 .../main/resources/case/dal/plan-replayer-play.xml | 21 ++++++++++
 .../parser/src/main/resources/case/dml/select.xml  | 27 +++++++++++++
 .../sql/supported/dal/clean-all-profile.xml        | 21 ++++++++++
 .../sql/supported/dal/plan-replayer-play.xml       | 21 ++++++++++
 .../main/resources/sql/supported/dml/select.xml    |  3 ++
 21 files changed, 447 insertions(+)

diff --git a/parser/sql/engine/core/src/main/java/org/apache/shardingsphere/sql/parser/engine/core/database/visitor/SQLVisitorRule.java b/parser/sql/engine/core/src/main/java/org/apache/shardingsphere/sql/parser/engine/core/database/visitor/SQLVisitorRule.java
index d34d41fa1f1..d99226a161d 100644
--- a/parser/sql/engine/core/src/main/java/org/apache/shardingsphere/sql/parser/engine/core/database/visitor/SQLVisitorRule.java
+++ b/parser/sql/engine/core/src/main/java/org/apache/shardingsphere/sql/parser/engine/core/database/visitor/SQLVisitorRule.java
@@ -595,6 +595,10 @@ public enum SQLVisitorRule {
     
     ADMIN_CLEAN_TRASH("AdminCleanTrash", SQLStatementType.DAL),
     
+    CLEAN_ALL_PROFILE("CleanAllProfile", SQLStatementType.DAL),
+    
+    PLAN_REPLAYER_PLAY("PlanReplayerPlay", SQLStatementType.DAL),
+    
     CREATE_SQL_BLOCK_RULE("CreateSqlBlockRule", SQLStatementType.DAL),
     
     DELIMITER("Delimiter", SQLStatementType.DAL),
diff --git a/parser/sql/engine/dialect/doris/src/main/antlr4/imports/doris/BaseRule.g4 b/parser/sql/engine/dialect/doris/src/main/antlr4/imports/doris/BaseRule.g4
index dd9c6da3bae..fc84c65a873 100644
--- a/parser/sql/engine/dialect/doris/src/main/antlr4/imports/doris/BaseRule.g4
+++ b/parser/sql/engine/dialect/doris/src/main/antlr4/imports/doris/BaseRule.g4
@@ -404,6 +404,9 @@ identifierKeywordsUnambiguous
     | PATH
     | PAUSE
     | PHASE
+    // DORIS ADDED BEGIN
+    | PLAN
+    // DORIS ADDED END
     | PLUGINS
     | PLUGIN_DIR
     | PLUGIN
@@ -442,6 +445,9 @@ identifierKeywordsUnambiguous
     | REORGANIZE
     | REPEATABLE
     | REPLACE_IF_NOT_NULL
+    // DORIS ADDED BEGIN
+    | REPLAYER
+    // DORIS ADDED END
     | REPLICATE_DO_DB
     | REPLICATE_DO_TABLE
     | REPLICATE_IGNORE_DB
diff --git a/parser/sql/engine/dialect/doris/src/main/antlr4/imports/doris/DALStatement.g4 b/parser/sql/engine/dialect/doris/src/main/antlr4/imports/doris/DALStatement.g4
index 42211421481..79b7b032e01 100644
--- a/parser/sql/engine/dialect/doris/src/main/antlr4/imports/doris/DALStatement.g4
+++ b/parser/sql/engine/dialect/doris/src/main/antlr4/imports/doris/DALStatement.g4
@@ -442,6 +442,16 @@ adminCleanTrash
     : ADMIN CLEAN TRASH (ON LP_ string_ (COMMA_ string_)* RP_)?
     ;
 
+// DORIS ADDED BEGIN
+cleanAllProfile
+    : CLEAN ALL PROFILE
+    ;
+
+planReplayerPlay
+    : PLAN REPLAYER PLAY DOUBLE_QUOTED_TEXT
+    ;
+// DORIS ADDED END
+
 dorisAlterSystem
     : ALTER SYSTEM dorisAlterSystemAction
     ;
diff --git a/parser/sql/engine/dialect/doris/src/main/antlr4/imports/doris/DorisKeyword.g4 b/parser/sql/engine/dialect/doris/src/main/antlr4/imports/doris/DorisKeyword.g4
index 4a19f5e7c66..55c655c0531 100644
--- a/parser/sql/engine/dialect/doris/src/main/antlr4/imports/doris/DorisKeyword.g4
+++ b/parser/sql/engine/dialect/doris/src/main/antlr4/imports/doris/DorisKeyword.g4
@@ -2026,6 +2026,16 @@ PHASE
     : P H A S E
     ;
 
+// DORIS ADDED BEGIN
+PLAN
+    : P L A N
+    ;
+
+PLAY
+    : P L A Y
+    ;
+// DORIS ADDED END
+
 PLUGIN
     : P L U G I N
     ;
@@ -2276,6 +2286,12 @@ REPLACE
     : R E P L A C E
     ;
 
+// DORIS ADDED BEGIN
+REPLAYER
+    : R E P L A Y E R
+    ;
+// DORIS ADDED END
+
 REPLICA
     : R E P L I C A
     ;
diff --git a/parser/sql/engine/dialect/doris/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/DorisStatement.g4 b/parser/sql/engine/dialect/doris/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/DorisStatement.g4
index dfaa7cc11a3..c0005b9f930 100644
--- a/parser/sql/engine/dialect/doris/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/DorisStatement.g4
+++ b/parser/sql/engine/dialect/doris/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/DorisStatement.g4
@@ -171,6 +171,8 @@ execute
     | backup
     | cancelBackup
     | cancelLoadStatement
+    | cleanAllProfile
+    | planReplayerPlay
     // TODO consider refactor following sytax to SEMI_? EOF
     ) (SEMI_ EOF? | EOF)
     | EOF
diff --git a/parser/sql/engine/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/engine/doris/visitor/statement/type/DorisDALStatementVisitor.java b/parser/sql/engine/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/engine/doris/visitor/statement/type/DorisDALStatementVisitor.java
index 9aac362448e..e9a56b50132 100644
--- a/parser/sql/engine/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/engine/doris/visitor/statement/type/DorisDALStatementVisitor.java
+++ b/parser/sql/engine/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/engine/doris/visitor/statement/type/DorisDALStatementVisitor.java
@@ -145,6 +145,8 @@ import org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.PluginP
 import org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.PluginPropertyKeyContext;
 import org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.PluginPropertyValueContext;
 import org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.AdminCleanTrashContext;
+import org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.CleanAllProfileContext;
+import org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.PlanReplayerPlayContext;
 import org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.DorisAlterSystemContext;
 import org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.AdminSetReplicaStatusContext;
 import org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.AdminSetReplicaVersionContext;
@@ -230,6 +232,8 @@ import org.apache.shardingsphere.sql.parser.statement.core.value.literal.impl.Nu
 import org.apache.shardingsphere.sql.parser.statement.core.value.literal.impl.OtherLiteralValue;
 import org.apache.shardingsphere.sql.parser.statement.core.value.literal.impl.TemporalLiteralValue;
 import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisAdminCleanTrashStatement;
+import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisCleanAllProfileStatement;
+import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisPlanReplayerPlayStatement;
 import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisAdminSetReplicaStatusStatement;
 import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisAdminSetReplicaVersionStatement;
 import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisAdminCopyTabletStatement;
@@ -1264,6 +1268,16 @@ public final class DorisDALStatementVisitor extends DorisStatementVisitor implem
         return result;
     }
     
+    @Override
+    public ASTNode visitCleanAllProfile(final CleanAllProfileContext ctx) {
+        return new DorisCleanAllProfileStatement(getDatabaseType());
+    }
+    
+    @Override
+    public ASTNode visitPlanReplayerPlay(final PlanReplayerPlayContext ctx) {
+        return new DorisPlanReplayerPlayStatement(getDatabaseType(), SQLUtils.getExactlyValue(ctx.DOUBLE_QUOTED_TEXT().getText()));
+    }
+    
     @Override
     public ASTNode visitDorisAlterSystem(final DorisAlterSystemContext ctx) {
         return visit(ctx.dorisAlterSystemAction());
diff --git a/parser/sql/engine/dialect/doris/src/test/java/org/apache/shardingsphere/sql/parser/engine/doris/visitor/statement/type/DorisPlayKeywordIdentifierTest.java b/parser/sql/engine/dialect/doris/src/test/java/org/apache/shardingsphere/sql/parser/engine/doris/visitor/statement/type/DorisPlayKeywordIdentifierTest.java
new file mode 100644
index 00000000000..ea6df6b5ab1
--- /dev/null
+++ b/parser/sql/engine/dialect/doris/src/test/java/org/apache/shardingsphere/sql/parser/engine/doris/visitor/statement/type/DorisPlayKeywordIdentifierTest.java
@@ -0,0 +1,46 @@
+/*
+ * 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.shardingsphere.sql.parser.engine.doris.visitor.statement.type;
+
+import org.apache.shardingsphere.sql.parser.engine.api.CacheOption;
+import org.apache.shardingsphere.sql.parser.engine.api.SQLParserEngine;
+import org.apache.shardingsphere.sql.parser.engine.api.SQLStatementVisitorEngine;
+import org.apache.shardingsphere.sql.parser.engine.exception.SQLParsingException;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+class DorisPlayKeywordIdentifierTest {
+    
+    private static final CacheOption CACHE_OPTION = new CacheOption(128, 1024L);
+    
+    @Test
+    void assertUnquotedPlayIdentifierRejected() {
+        SQLParserEngine parserEngine = new SQLParserEngine("Doris", CACHE_OPTION);
+        SQLStatementVisitorEngine visitorEngine = new SQLStatementVisitorEngine("Doris");
+        assertThrows(SQLParsingException.class, () -> visitorEngine.visit(parserEngine.parse("SELECT play FROM t_play", false)));
+    }
+    
+    @Test
+    void assertQuotedPlayIdentifierAccepted() {
+        SQLParserEngine parserEngine = new SQLParserEngine("Doris", CACHE_OPTION);
+        SQLStatementVisitorEngine visitorEngine = new SQLStatementVisitorEngine("Doris");
+        assertDoesNotThrow(() -> visitorEngine.visit(parserEngine.parse("SELECT `play` FROM t_play", false)));
+    }
+}
diff --git a/parser/sql/statement/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/statement/doris/dal/DorisCleanAllProfileStatement.java b/parser/sql/statement/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/statement/doris/dal/DorisCleanAllProfileStatement.java
new file mode 100644
index 00000000000..beafa8ad8ab
--- /dev/null
+++ b/parser/sql/statement/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/statement/doris/dal/DorisCleanAllProfileStatement.java
@@ -0,0 +1,31 @@
+/*
+ * 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.shardingsphere.sql.parser.statement.doris.dal;
+
+import org.apache.shardingsphere.database.connector.core.type.DatabaseType;
+import org.apache.shardingsphere.sql.parser.statement.core.statement.type.dal.DALStatement;
+
+/**
+ * Clean all profile statement for Doris.
+ */
+public final class DorisCleanAllProfileStatement extends DALStatement {
+    
+    public DorisCleanAllProfileStatement(final DatabaseType databaseType) {
+        super(databaseType);
+    }
+}
diff --git a/parser/sql/statement/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/statement/doris/dal/DorisPlanReplayerPlayStatement.java b/parser/sql/statement/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/statement/doris/dal/DorisPlanReplayerPlayStatement.java
new file mode 100644
index 00000000000..154862df814
--- /dev/null
+++ b/parser/sql/statement/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/statement/doris/dal/DorisPlanReplayerPlayStatement.java
@@ -0,0 +1,36 @@
+/*
+ * 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.shardingsphere.sql.parser.statement.doris.dal;
+
+import lombok.Getter;
+import org.apache.shardingsphere.database.connector.core.type.DatabaseType;
+import org.apache.shardingsphere.sql.parser.statement.core.statement.type.dal.DALStatement;
+
+/**
+ * Plan replayer play statement for Doris.
+ */
+@Getter
+public final class DorisPlanReplayerPlayStatement extends DALStatement {
+    
+    private final String dumpFilePath;
+    
+    public DorisPlanReplayerPlayStatement(final DatabaseType databaseType, final String dumpFilePath) {
+        super(databaseType);
+        this.dumpFilePath = dumpFilePath;
+    }
+}
diff --git a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dal/dialect/doris/DorisDALStatementAssert.java b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dal/dialect/doris/DorisDALStatementAssert.java
index 2d9ea162a77..4b29037f423 100644
--- a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dal/dialect/doris/DorisDALStatementAssert.java
+++ b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dal/dialect/doris/DorisDALStatementAssert.java
@@ -22,6 +22,8 @@ import lombok.NoArgsConstructor;
 import org.apache.shardingsphere.sql.parser.statement.core.statement.type.dal.DALStatement;
 import org.apache.shardingsphere.sql.parser.statement.core.statement.type.dal.UnsetVariableStatement;
 import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisAdminCleanTrashStatement;
+import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisCleanAllProfileStatement;
+import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisPlanReplayerPlayStatement;
 import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisAdminCopyTabletStatement;
 import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisAdminSetReplicaStatusStatement;
 import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisAdminSetReplicaVersionStatement;
@@ -53,6 +55,8 @@ import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisSwitchState
 import org.apache.shardingsphere.sql.parser.statement.doris.dal.show.DorisShowQueryStatsStatement;
 import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.SQLCaseAssertContext;
 import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.statement.dal.dialect.doris.type.DorisAdminCleanTrashStatementAssert;
+import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.statement.dal.dialect.doris.type.DorisCleanAllProfileStatementAssert;
+import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.statement.dal.dialect.doris.type.DorisPlanReplayerPlayStatementAssert;
 import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.statement.dal.dialect.doris.type.DorisAdminCopyTabletStatementAssert;
 import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.statement.dal.dialect.doris.type.DorisAdminSetReplicaStatusStatementAssert;
 import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.statement.dal.dialect.doris.type.DorisAdminSetReplicaVersionStatementAssert;
@@ -85,6 +89,8 @@ import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.statement.d
 import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.statement.dal.dialect.doris.type.DorisUnsetVariableStatementAssert;
 import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.SQLParserTestCase;
 import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisAdminCleanTrashStatementTestCase;
+import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisCleanAllProfileStatementTestCase;
+import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisPlanReplayerPlayStatementTestCase;
 import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisAdminCopyTabletStatementTestCase;
 import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisAdminSetReplicaStatusStatementTestCase;
 import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisAdminSetReplicaVersionStatementTestCase;
@@ -192,6 +198,10 @@ public final class DorisDALStatementAssert {
             DorisCancelLoadStatementAssert.assertIs(assertContext, (DorisCancelLoadStatement) actual, (DorisCancelLoadStatementTestCase) expected);
         } else if (actual instanceof DorisShowLoadWarningsStatement) {
             DorisShowLoadWarningsStatementAssert.assertIs(assertContext, (DorisShowLoadWarningsStatement) actual, (DorisShowLoadWarningsStatementTestCase) expected);
+        } else if (actual instanceof DorisCleanAllProfileStatement) {
+            DorisCleanAllProfileStatementAssert.assertIs(assertContext, (DorisCleanAllProfileStatement) actual, (DorisCleanAllProfileStatementTestCase) expected);
+        } else if (actual instanceof DorisPlanReplayerPlayStatement) {
+            DorisPlanReplayerPlayStatementAssert.assertIs(assertContext, (DorisPlanReplayerPlayStatement) actual, (DorisPlanReplayerPlayStatementTestCase) expected);
         }
     }
 }
diff --git a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dal/dialect/doris/type/DorisCleanAllProfileStatementAssert.java b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dal/dialect/doris/type/DorisCleanAllProfileStatementAssert.java
new file mode 100644
index 00000000000..12981ba6427
--- /dev/null
+++ b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dal/dialect/doris/type/DorisCleanAllProfileStatementAssert.java
@@ -0,0 +1,41 @@
+/*
+ * 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.shardingsphere.test.it.sql.parser.internal.asserts.statement.dal.dialect.doris.type;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisCleanAllProfileStatement;
+import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.SQLCaseAssertContext;
+import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisCleanAllProfileStatementTestCase;
+
+/**
+ * Clean all profile statement assert for Doris.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class DorisCleanAllProfileStatementAssert {
+    
+    /**
+     * Assert clean all profile statement is correct with expected parser result.
+     *
+     * @param assertContext assert context
+     * @param actual actual clean all profile statement
+     * @param expected expected clean all profile statement test case
+     */
+    public static void assertIs(final SQLCaseAssertContext assertContext, final DorisCleanAllProfileStatement actual, final DorisCleanAllProfileStatementTestCase expected) {
+    }
+}
diff --git a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dal/dialect/doris/type/DorisPlanReplayerPlayStatementAssert.java b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dal/dialect/doris/type/DorisPlanReplayerPlayStatementAssert.java
new file mode 100644
index 00000000000..4397227b365
--- /dev/null
+++ b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dal/dialect/doris/type/DorisPlanReplayerPlayStatementAssert.java
@@ -0,0 +1,45 @@
+/*
+ * 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.shardingsphere.test.it.sql.parser.internal.asserts.statement.dal.dialect.doris.type;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisPlanReplayerPlayStatement;
+import org.apache.shardingsphere.test.it.sql.parser.internal.asserts.SQLCaseAssertContext;
+import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisPlanReplayerPlayStatementTestCase;
+import org.hamcrest.MatcherAssert;
+
+import static org.hamcrest.Matchers.is;
+
+/**
+ * Plan replayer play statement assert for Doris.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class DorisPlanReplayerPlayStatementAssert {
+    
+    /**
+     * Assert plan replayer play statement is correct with expected parser result.
+     *
+     * @param assertContext assert context
+     * @param actual actual plan replayer play statement
+     * @param expected expected plan replayer play statement test case
+     */
+    public static void assertIs(final SQLCaseAssertContext assertContext, final DorisPlanReplayerPlayStatement actual, final DorisPlanReplayerPlayStatementTestCase expected) {
+        MatcherAssert.assertThat(assertContext.getText("Assertion error: dump file path does not match."), actual.getDumpFilePath(), is(expected.getDumpFilePath()));
+    }
+}
diff --git a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/RootSQLParserTestCases.java b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/RootSQLParserTestCases.java
index abff0e698ee..47a55c95718 100644
--- a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/RootSQLParserTestCases.java
+++ b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/RootSQLParserTestCases.java
@@ -22,6 +22,8 @@ import lombok.Getter;
 import lombok.SneakyThrows;
 import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.CommonStatementTestCase;
 import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisAdminCleanTrashStatementTestCase;
+import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisCleanAllProfileStatementTestCase;
+import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisPlanReplayerPlayStatementTestCase;
 import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisAdminCopyTabletStatementTestCase;
 import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisAdminSetReplicaStatusStatementTestCase;
 import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisAdminSetReplicaVersionStatementTestCase;
@@ -791,6 +793,12 @@ public final class RootSQLParserTestCases {
     @XmlElement(name = "admin-clean-trash")
     private final List<DorisAdminCleanTrashStatementTestCase> adminCleanTrashTestCases = new LinkedList<>();
     
+    @XmlElement(name = "clean-all-profile")
+    private final List<DorisCleanAllProfileStatementTestCase> cleanAllProfileTestCases = new LinkedList<>();
+    
+    @XmlElement(name = "plan-replayer-play")
+    private final List<DorisPlanReplayerPlayStatementTestCase> planReplayerPlayTestCases = new LinkedList<>();
+    
     @XmlElement(name = "show-trash")
     private final List<DorisShowTrashStatementTestCase> showTrashTestCases = new LinkedList<>();
     
diff --git a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/dal/dialect/doris/DorisCleanAllProfileStatementTestCase.java b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/dal/dialect/doris/DorisCleanAllProfileStatementTestCase.java
new file mode 100644
index 00000000000..04ff25a1b23
--- /dev/null
+++ b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/dal/dialect/doris/DorisCleanAllProfileStatementTestCase.java
@@ -0,0 +1,26 @@
+/*
+ * 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.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris;
+
+import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.SQLParserTestCase;
+
+/**
+ * Clean all profile statement test case for Doris.
+ */
+public final class DorisCleanAllProfileStatementTestCase extends SQLParserTestCase {
+}
diff --git a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/dal/dialect/doris/DorisPlanReplayerPlayStatementTestCase.java b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/dal/dialect/doris/DorisPlanReplayerPlayStatementTestCase.java
new file mode 100644
index 00000000000..18250f1891c
--- /dev/null
+++ b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/dal/dialect/doris/DorisPlanReplayerPlayStatementTestCase.java
@@ -0,0 +1,38 @@
+/*
+ * 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.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris;
+
+import lombok.Getter;
+import lombok.Setter;
+import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.SQLParserTestCase;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ * Plan replayer play statement test case for Doris.
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@Getter
+@Setter
+public final class DorisPlanReplayerPlayStatementTestCase extends SQLParserTestCase {
+    
+    @XmlAttribute(name = "dump-file-path")
+    private String dumpFilePath;
+}
diff --git a/test/it/parser/src/main/resources/case/dal/clean-all-profile.xml b/test/it/parser/src/main/resources/case/dal/clean-all-profile.xml
new file mode 100644
index 00000000000..9ad2d6c02c1
--- /dev/null
+++ b/test/it/parser/src/main/resources/case/dal/clean-all-profile.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<sql-parser-test-cases>
+    <clean-all-profile sql-case-id="clean_all_profile" />
+</sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/dal/plan-replayer-play.xml b/test/it/parser/src/main/resources/case/dal/plan-replayer-play.xml
new file mode 100644
index 00000000000..a25ac83a66d
--- /dev/null
+++ b/test/it/parser/src/main/resources/case/dal/plan-replayer-play.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<sql-parser-test-cases>
+    <plan-replayer-play sql-case-id="plan_replayer_play_dumpfile" dump-file-path="/home/wangwu/dumpfile.json" />
+</sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/dml/select.xml b/test/it/parser/src/main/resources/case/dml/select.xml
index d41d24ca8c5..07a5b270374 100644
--- a/test/it/parser/src/main/resources/case/dml/select.xml
+++ b/test/it/parser/src/main/resources/case/dml/select.xml
@@ -10453,6 +10453,33 @@
         </from>
     </select>
 
+    <select sql-case-id="select_plan_as_identifier_doris">
+        <projections start-index="7" stop-index="10">
+            <column-projection name="plan" start-index="7" stop-index="10" />
+        </projections>
+        <from start-index="17" stop-index="22">
+            <simple-table name="t_plan" start-index="17" stop-index="22" />
+        </from>
+    </select>
+    
+    <select sql-case-id="select_replayer_as_identifier_doris">
+        <projections start-index="7" stop-index="14">
+            <column-projection name="replayer" start-index="7" stop-index="14" />
+        </projections>
+        <from start-index="21" stop-index="30">
+            <simple-table name="t_replayer" start-index="21" stop-index="30" />
+        </from>
+    </select>
+    
+    <select sql-case-id="select_play_as_quoted_identifier_doris">
+        <projections start-index="7" stop-index="12">
+            <column-projection name="play" start-index="7" stop-index="12" start-delimiter="`" end-delimiter="`" />
+        </projections>
+        <from start-index="19" stop-index="24">
+            <simple-table name="t_play" start-index="19" stop-index="24" />
+        </from>
+    </select>
+
     <select sql-case-id="select_with_nvl_function_and_interval_hour" parameters="1">
         <projections start-index="7" stop-index="7">
             <shorthand-projection start-index="7" stop-index="7" />
diff --git a/test/it/parser/src/main/resources/sql/supported/dal/clean-all-profile.xml b/test/it/parser/src/main/resources/sql/supported/dal/clean-all-profile.xml
new file mode 100644
index 00000000000..dc5cea76128
--- /dev/null
+++ b/test/it/parser/src/main/resources/sql/supported/dal/clean-all-profile.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<sql-cases>
+    <sql-case id="clean_all_profile" value="CLEAN ALL PROFILE" db-types="Doris" />
+</sql-cases>
diff --git a/test/it/parser/src/main/resources/sql/supported/dal/plan-replayer-play.xml b/test/it/parser/src/main/resources/sql/supported/dal/plan-replayer-play.xml
new file mode 100644
index 00000000000..43b23275ef2
--- /dev/null
+++ b/test/it/parser/src/main/resources/sql/supported/dal/plan-replayer-play.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<sql-cases>
+    <sql-case id="plan_replayer_play_dumpfile" value="PLAN REPLAYER PLAY &quot;/home/wangwu/dumpfile.json&quot;" db-types="Doris" />
+</sql-cases>
diff --git a/test/it/parser/src/main/resources/sql/supported/dml/select.xml b/test/it/parser/src/main/resources/sql/supported/dml/select.xml
index 6bbad212261..332170ddcca 100644
--- a/test/it/parser/src/main/resources/sql/supported/dml/select.xml
+++ b/test/it/parser/src/main/resources/sql/supported/dml/select.xml
@@ -495,6 +495,9 @@
     <sql-case id="select_format_function_oracle" value="SELECT FORMAT('abc', '999') FROM dual" db-types="Oracle" />
     <sql-case id="select_first_value_oracle" value="SELECT FIRST_VALUE(salary) OVER (ORDER BY salary) FROM employees" db-types="Oracle" />
     <sql-case id="select_datetime_lbe_literal_oracle" value="SELECT {ts '2020-02-02 10:00:00'} FROM dual" db-types="Oracle" />
+    <sql-case id="select_plan_as_identifier_doris" value="SELECT plan FROM t_plan" db-types="Doris" />
+    <sql-case id="select_replayer_as_identifier_doris" value="SELECT replayer FROM t_replayer" db-types="Doris" />
+    <sql-case id="select_play_as_quoted_identifier_doris" value="SELECT `play` FROM t_play" db-types="Doris" />
     <sql-case id="select_order_by_order" value="SELECT id FROM test ORDER BY `order` " db-types="MySQL,Hive,Doris,Presto" />
     <sql-case id="select_order_by_order_two" value="SELECT id FROM t_test ORDER BY t_test.order" db-types="MySQL,Hive,Doris,SQLServer,Firebird,SQL92,Presto" />
     <sql-case id="select_pg_database_info" value="SELECT d.datname as &quot;Name&quot;, pg_catalog.pg_get_userbyid(d.datdba) as &quot;Owner&quot;, pg_catalog.pg_encoding_to_char(d.encoding) as &quot;Encoding&quot;, d.datcollate as &quot;Collate&quot;, d.datctype as &quot;Ctype&quot;, pg_catalog.array_to_string(d.datacl, E'\n') AS &quot;Access privileges&quot; FROM pg_catalog.pg_database d ORDER BY 1;" db-types="openGauss" />