This is an automated email from the ASF dual-hosted git repository.
terrymanu 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 214490a47bd Support parsing Doris SHOW RESOURCES syntax (#38598)
214490a47bd is described below
commit 214490a47bdd7ae29265b60a833907d2e308ee9f
Author: cxy <[email protected]>
AuthorDate: Thu May 28 15:18:36 2026 +0600
Support parsing Doris SHOW RESOURCES syntax (#38598)
---
.../core/database/visitor/SQLVisitorRule.java | 2 +
.../src/main/antlr4/imports/doris/BaseRule.g4 | 4 +
.../src/main/antlr4/imports/doris/DALStatement.g4 | 26 +++++
.../src/main/antlr4/imports/doris/DorisKeyword.g4 | 10 ++
.../statement/type/DorisDALStatementVisitor.java | 39 ++++++++
.../dal/ShowResourcesNameConditionSegment.java | 38 ++++++++
.../ShowResourcesResourceTypeConditionSegment.java | 36 +++++++
.../doris/dal/DorisShowResourcesStatement.java | 97 +++++++++++++++++++
.../dal/dialect/doris/DorisDALStatementAssert.java | 5 +
.../type/DorisShowResourcesStatementAssert.java | 105 +++++++++++++++++++++
.../cases/parser/jaxb/RootSQLParserTestCases.java | 4 +
.../show/ExpectedShowResourcesNameCondition.java | 41 ++++++++
...ExpectedShowResourcesResourceTypeCondition.java | 38 ++++++++
.../doris/DorisShowResourcesStatementTestCase.java | 52 ++++++++++
.../src/main/resources/case/dal/show-resources.xml | 73 ++++++++++++++
.../parser/src/main/resources/case/dml/select.xml | 18 ++++
.../resources/sql/supported/dal/show-resources.xml | 29 ++++++
.../main/resources/sql/supported/dml/select.xml | 2 +
18 files changed, 619 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 25fe18e14ea..ea28239459b 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
@@ -483,6 +483,8 @@ public enum SQLVisitorRule {
SHOW_REPLICA_STATUS("ShowReplicaStatus", SQLStatementType.DAL),
+ SHOW_RESOURCES("ShowResources", SQLStatementType.DAL),
+
SHOW_SLAVE_HOSTS("ShowSlaveHosts", SQLStatementType.DAL),
SHOW_SLAVE_STATUS("ShowSlaveStatus", 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 fc84c65a873..75f7111631f 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
@@ -459,6 +459,10 @@ identifierKeywordsUnambiguous
| REQUIRE_ROW_FORMAT
// | REQUIRE_TABLE_PRIMARY_KEY_CHECK
| USER_RESOURCES
+ // DORIS ADDED BEGIN
+ | RESOURCES
+ | RESOURCETYPE
+ // DORIS ADDED END
| RESPECT
| RESTORE
| RESUME
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 79b7b032e01..6f9b0f456d8 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
@@ -487,6 +487,29 @@ dropSqlBlockRule
: DROP SQL_BLOCK_RULE ruleNames
;
+// DORIS ADDED BEGIN
+showResources
+ : SHOW RESOURCES (showResourcesWhereClause | showLike)? orderByClause?
limitClause?
+ ;
+
+showResourcesWhereClause
+ : WHERE showResourcesWhereCondition
+ ;
+
+showResourcesWhereCondition
+ : showResourcesNameWhereCondition showResourcesResourceTypeWhereCondition?
+ | showResourcesResourceTypeWhereCondition
+ ;
+
+showResourcesNameWhereCondition
+ : NAME (EQ_ | LIKE) string_
+ ;
+
+showResourcesResourceTypeWhereCondition
+ : RESOURCETYPE EQ_ string_
+ ;
+// DORIS ADDED END
+
showSqlBlockRule
: SHOW SQL_BLOCK_RULE (FOR ruleName)?
;
@@ -948,4 +971,7 @@ show
| showFile
| showEncryptKeys
| showTrash
+ // DORIS ADDED BEGIN
+ | showResources
+ // DORIS ADDED END
;
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 55c655c0531..58fffebae27 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
@@ -2364,6 +2364,16 @@ RESOURCE
: R E S O U R C E
;
+// DORIS ADDED BEGIN
+RESOURCES
+ : R E S O U R C E S
+ ;
+
+RESOURCETYPE
+ : R E S O U R C E T Y P E
+ ;
+// DORIS ADDED END
+
RESPECT
: R E S P E C T
;
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 e9a56b50132..55e968d0c19 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
@@ -174,6 +174,10 @@ import
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.ShowBui
import
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.ShowAlterTableContext;
import
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.ShowLoadContext;
import
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.ShowLoadWarningsContext;
+import
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.ShowResourcesNameWhereConditionContext;
+import
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.ShowResourcesResourceTypeWhereConditionContext;
+import
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.ShowResourcesWhereClauseContext;
+import
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.ShowResourcesContext;
import
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.ShowLoadWarningsWhereConditionContext;
import
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.ShowStreamLoadContext;
import
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.BackupContext;
@@ -266,8 +270,11 @@ import
org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisShowCreateL
import
org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisShowCreateRoutineLoadStatement;
import
org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisShowLoadStatement;
import
org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisShowLoadWarningsStatement;
+import
org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisShowResourcesStatement;
import
org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisShowStreamLoadStatement;
import
org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisSyncStatement;
+import
org.apache.shardingsphere.sql.parser.statement.core.segment.dal.ShowResourcesNameConditionSegment;
+import
org.apache.shardingsphere.sql.parser.statement.core.segment.dal.ShowResourcesResourceTypeConditionSegment;
import
org.apache.shardingsphere.sql.parser.statement.core.segment.dal.RepositoryNameSegment;
import
org.apache.shardingsphere.sql.parser.statement.core.statement.type.dal.ShowBuildIndexStatement;
import
org.apache.shardingsphere.sql.parser.statement.core.statement.type.dal.ShowAlterTableStatement;
@@ -1399,6 +1406,38 @@ public final class DorisDALStatementVisitor extends
DorisStatementVisitor implem
return result;
}
+ @Override
+ public ASTNode visitShowResources(final ShowResourcesContext ctx) {
+ DorisShowResourcesStatement result = new
DorisShowResourcesStatement(getDatabaseType());
+ if (null != ctx.showResourcesWhereClause()) {
+ setShowResourcesWhereClause(result,
ctx.showResourcesWhereClause());
+ }
+ if (null != ctx.showLike()) {
+ result.setLike((ShowLikeSegment) visit(ctx.showLike()));
+ }
+ if (null != ctx.orderByClause()) {
+ result.setOrderBy((OrderBySegment) visit(ctx.orderByClause()));
+ }
+ if (null != ctx.limitClause()) {
+ result.setLimit((LimitSegment) visit(ctx.limitClause()));
+ }
+ return result;
+ }
+
+ private void setShowResourcesWhereClause(final DorisShowResourcesStatement
result, final ShowResourcesWhereClauseContext ctx) {
+ ShowResourcesNameWhereConditionContext nameWhereCondition =
ctx.showResourcesWhereCondition().showResourcesNameWhereCondition();
+ if (null != nameWhereCondition) {
+ String type = null != nameWhereCondition.LIKE() ? "LIKE" : "=";
+ String value =
SQLUtils.getExactlyValue(nameWhereCondition.string_().getText());
+ result.setNameCondition(new
ShowResourcesNameConditionSegment(nameWhereCondition.start.getStartIndex(),
nameWhereCondition.stop.getStopIndex(), type, value));
+ }
+ ShowResourcesResourceTypeWhereConditionContext
resourceTypeWhereCondition =
ctx.showResourcesWhereCondition().showResourcesResourceTypeWhereCondition();
+ if (null != resourceTypeWhereCondition) {
+ String value =
SQLUtils.getExactlyValue(resourceTypeWhereCondition.string_().getText());
+ result.setResourceTypeCondition(new
ShowResourcesResourceTypeConditionSegment(resourceTypeWhereCondition.start.getStartIndex(),
resourceTypeWhereCondition.stop.getStopIndex(), value));
+ }
+ }
+
@Override
public ASTNode visitShowLoad(final ShowLoadContext ctx) {
DorisShowLoadStatement result = new
DorisShowLoadStatement(getDatabaseType());
diff --git
a/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/segment/dal/ShowResourcesNameConditionSegment.java
b/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/segment/dal/ShowResourcesNameConditionSegment.java
new file mode 100644
index 00000000000..d5f6c1d1a28
--- /dev/null
+++
b/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/segment/dal/ShowResourcesNameConditionSegment.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.sql.parser.statement.core.segment.dal;
+
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+import org.apache.shardingsphere.sql.parser.statement.core.segment.SQLSegment;
+
+/**
+ * Show resources name condition segment for Doris.
+ */
+@RequiredArgsConstructor
+@Getter
+public final class ShowResourcesNameConditionSegment implements SQLSegment {
+
+ private final int startIndex;
+
+ private final int stopIndex;
+
+ private final String type;
+
+ private final String value;
+}
diff --git
a/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/segment/dal/ShowResourcesResourceTypeConditionSegment.java
b/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/segment/dal/ShowResourcesResourceTypeConditionSegment.java
new file mode 100644
index 00000000000..5e82d9a7676
--- /dev/null
+++
b/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/segment/dal/ShowResourcesResourceTypeConditionSegment.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.core.segment.dal;
+
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+import org.apache.shardingsphere.sql.parser.statement.core.segment.SQLSegment;
+
+/**
+ * Show resources resource type condition segment for Doris.
+ */
+@RequiredArgsConstructor
+@Getter
+public final class ShowResourcesResourceTypeConditionSegment implements
SQLSegment {
+
+ private final int startIndex;
+
+ private final int stopIndex;
+
+ private final String value;
+}
diff --git
a/parser/sql/statement/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/statement/doris/dal/DorisShowResourcesStatement.java
b/parser/sql/statement/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/statement/doris/dal/DorisShowResourcesStatement.java
new file mode 100644
index 00000000000..37394e5198d
--- /dev/null
+++
b/parser/sql/statement/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/statement/doris/dal/DorisShowResourcesStatement.java
@@ -0,0 +1,97 @@
+/*
+ * 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 lombok.Setter;
+import org.apache.shardingsphere.database.connector.core.type.DatabaseType;
+import
org.apache.shardingsphere.sql.parser.statement.core.segment.dal.ShowLikeSegment;
+import
org.apache.shardingsphere.sql.parser.statement.core.segment.dml.order.OrderBySegment;
+import
org.apache.shardingsphere.sql.parser.statement.core.segment.dml.pagination.limit.LimitSegment;
+import
org.apache.shardingsphere.sql.parser.statement.core.statement.type.dal.DALStatement;
+import
org.apache.shardingsphere.sql.parser.statement.core.segment.dal.ShowResourcesNameConditionSegment;
+import
org.apache.shardingsphere.sql.parser.statement.core.segment.dal.ShowResourcesResourceTypeConditionSegment;
+
+import java.util.Optional;
+
+/**
+ * Show resources statement for Doris.
+ */
+@Getter
+@Setter
+public final class DorisShowResourcesStatement extends DALStatement {
+
+ private ShowResourcesNameConditionSegment nameCondition;
+
+ private ShowResourcesResourceTypeConditionSegment resourceTypeCondition;
+
+ private ShowLikeSegment like;
+
+ private OrderBySegment orderBy;
+
+ private LimitSegment limit;
+
+ public DorisShowResourcesStatement(final DatabaseType databaseType) {
+ super(databaseType);
+ }
+
+ /**
+ * Get name condition segment.
+ *
+ * @return name condition segment
+ */
+ public Optional<ShowResourcesNameConditionSegment> getNameCondition() {
+ return Optional.ofNullable(nameCondition);
+ }
+
+ /**
+ * Get resource type condition segment.
+ *
+ * @return resource type condition segment
+ */
+ public Optional<ShowResourcesResourceTypeConditionSegment>
getResourceTypeCondition() {
+ return Optional.ofNullable(resourceTypeCondition);
+ }
+
+ /**
+ * Get like pattern.
+ *
+ * @return like pattern
+ */
+ public Optional<ShowLikeSegment> getLike() {
+ return Optional.ofNullable(like);
+ }
+
+ /**
+ * Get order by.
+ *
+ * @return order by
+ */
+ public Optional<OrderBySegment> getOrderBy() {
+ return Optional.ofNullable(orderBy);
+ }
+
+ /**
+ * Get limit.
+ *
+ * @return limit
+ */
+ public Optional<LimitSegment> getLimit() {
+ return Optional.ofNullable(limit);
+ }
+}
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 4b29037f423..95582301a26 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
@@ -44,6 +44,7 @@ import
org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisShowDataTyp
import
org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisShowCreateLoadStatement;
import
org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisShowLoadStatement;
import
org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisShowLoadWarningsStatement;
+import
org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisShowResourcesStatement;
import
org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisShowStreamLoadStatement;
import
org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisShowProcStatement;
import
org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisShowTrashStatement;
@@ -79,6 +80,7 @@ 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.DorisShowCreateLoadStatementAssert;
import
org.apache.shardingsphere.test.it.sql.parser.internal.asserts.statement.dal.dialect.doris.type.DorisShowLoadStatementAssert;
import
org.apache.shardingsphere.test.it.sql.parser.internal.asserts.statement.dal.dialect.doris.type.DorisShowLoadWarningsStatementAssert;
+import
org.apache.shardingsphere.test.it.sql.parser.internal.asserts.statement.dal.dialect.doris.type.DorisShowResourcesStatementAssert;
import
org.apache.shardingsphere.test.it.sql.parser.internal.asserts.statement.dal.dialect.doris.type.DorisShowStreamLoadStatementAssert;
import
org.apache.shardingsphere.test.it.sql.parser.internal.asserts.statement.dal.dialect.doris.type.DorisShowCreateRoutineLoadStatementAssert;
import
org.apache.shardingsphere.test.it.sql.parser.internal.asserts.statement.dal.dialect.doris.type.DorisShowQueryStatsStatementAssert;
@@ -113,6 +115,7 @@ import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.s
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisShowCreateLoadStatementTestCase;
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisShowLoadStatementTestCase;
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisShowLoadWarningsStatementTestCase;
+import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisShowResourcesStatementTestCase;
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisShowStreamLoadStatementTestCase;
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisShowCreateRoutineLoadStatementTestCase;
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisShowEncryptKeysStatementTestCase;
@@ -202,6 +205,8 @@ public final class DorisDALStatementAssert {
DorisCleanAllProfileStatementAssert.assertIs(assertContext,
(DorisCleanAllProfileStatement) actual, (DorisCleanAllProfileStatementTestCase)
expected);
} else if (actual instanceof DorisPlanReplayerPlayStatement) {
DorisPlanReplayerPlayStatementAssert.assertIs(assertContext,
(DorisPlanReplayerPlayStatement) actual,
(DorisPlanReplayerPlayStatementTestCase) expected);
+ } else if (actual instanceof DorisShowResourcesStatement) {
+ DorisShowResourcesStatementAssert.assertIs(assertContext,
(DorisShowResourcesStatement) actual, (DorisShowResourcesStatementTestCase)
expected);
}
}
}
diff --git
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dal/dialect/doris/type/DorisShowResourcesStatementAssert.java
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dal/dialect/doris/type/DorisShowResourcesStatementAssert.java
new file mode 100644
index 00000000000..b049323a4eb
--- /dev/null
+++
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dal/dialect/doris/type/DorisShowResourcesStatementAssert.java
@@ -0,0 +1,105 @@
+/*
+ * 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.DorisShowResourcesStatement;
+import
org.apache.shardingsphere.test.it.sql.parser.internal.asserts.SQLCaseAssertContext;
+import
org.apache.shardingsphere.test.it.sql.parser.internal.asserts.segment.SQLSegmentAssert;
+import
org.apache.shardingsphere.test.it.sql.parser.internal.asserts.segment.limit.LimitClauseAssert;
+import
org.apache.shardingsphere.test.it.sql.parser.internal.asserts.segment.orderby.OrderByClauseAssert;
+import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisShowResourcesStatementTestCase;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+
+/**
+ * Show resources statement assert for Doris.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class DorisShowResourcesStatementAssert {
+
+ /**
+ * Assert show resources statement is correct with expected parser result.
+ *
+ * @param assertContext assert context
+ * @param actual actual show resources statement
+ * @param expected expected show resources statement test case
+ */
+ public static void assertIs(final SQLCaseAssertContext assertContext,
final DorisShowResourcesStatement actual, final
DorisShowResourcesStatementTestCase expected) {
+ assertNameCondition(assertContext, actual, expected);
+ assertResourceTypeCondition(assertContext, actual, expected);
+ assertLike(assertContext, actual, expected);
+ assertOrderBy(assertContext, actual, expected);
+ assertLimit(assertContext, actual, expected);
+ }
+
+ private static void assertNameCondition(final SQLCaseAssertContext
assertContext, final DorisShowResourcesStatement actual, final
DorisShowResourcesStatementTestCase expected) {
+ if (null != expected.getNameCondition()) {
+ assertNotNull(actual.getNameCondition().orElse(null),
assertContext.getText("Actual name condition segment should exist."));
+ assertThat(assertContext.getText("Name condition type does not
match: "), actual.getNameCondition().get().getType(),
is(expected.getNameCondition().getType()));
+ assertThat(assertContext.getText("Name condition value does not
match: "), actual.getNameCondition().get().getValue(),
is(expected.getNameCondition().getValue()));
+ SQLSegmentAssert.assertIs(assertContext,
actual.getNameCondition().get(), expected.getNameCondition());
+ } else {
+ assertNull(actual.getNameCondition().orElse(null),
assertContext.getText("Actual name condition segment should not exist."));
+ }
+ }
+
+ private static void assertResourceTypeCondition(final SQLCaseAssertContext
assertContext, final DorisShowResourcesStatement actual, final
DorisShowResourcesStatementTestCase expected) {
+ if (null != expected.getResourceTypeCondition()) {
+ assertNotNull(actual.getResourceTypeCondition().orElse(null),
assertContext.getText("Actual resource type condition segment should exist."));
+ assertThat(assertContext.getText("Resource type value does not
match: "), actual.getResourceTypeCondition().get().getValue(),
is(expected.getResourceTypeCondition().getValue()));
+ SQLSegmentAssert.assertIs(assertContext,
actual.getResourceTypeCondition().get(), expected.getResourceTypeCondition());
+ } else {
+ assertNull(actual.getResourceTypeCondition().orElse(null),
assertContext.getText("Actual resource type condition segment should not
exist."));
+ }
+ }
+
+ private static void assertLike(final SQLCaseAssertContext assertContext,
final DorisShowResourcesStatement actual, final
DorisShowResourcesStatementTestCase expected) {
+ if (null != expected.getLike()) {
+ assertNotNull(actual.getLike().orElse(null),
assertContext.getText("Actual like segment should exist."));
+ assertThat(assertContext.getText("Like pattern does not match: "),
actual.getLike().get().getPattern(), is(expected.getLike().getPattern()));
+ SQLSegmentAssert.assertIs(assertContext, actual.getLike().get(),
expected.getLike());
+ } else {
+ assertNull(actual.getLike().orElse(null),
assertContext.getText("Actual like pattern should not exist."));
+ }
+ }
+
+ private static void assertOrderBy(final SQLCaseAssertContext
assertContext, final DorisShowResourcesStatement actual, final
DorisShowResourcesStatementTestCase expected) {
+ if (null != expected.getOrderBy()) {
+ assertNotNull(actual.getOrderBy().orElse(null),
assertContext.getText("Actual order by segment should exist."));
+ OrderByClauseAssert.assertIs(assertContext,
actual.getOrderBy().get(), expected.getOrderBy());
+ } else {
+ assertNull(actual.getOrderBy().orElse(null),
assertContext.getText("Actual order by segment should not exist."));
+ }
+ }
+
+ private static void assertLimit(final SQLCaseAssertContext assertContext,
final DorisShowResourcesStatement actual, final
DorisShowResourcesStatementTestCase expected) {
+ if (null != expected.getLimit()) {
+ assertNotNull(actual.getLimit().orElse(null),
assertContext.getText("Actual limit segment should exist."));
+ SQLSegmentAssert.assertIs(assertContext, actual.getLimit().get(),
expected.getLimit());
+ LimitClauseAssert.assertRowCount(assertContext,
actual.getLimit().get().getRowCount().orElse(null),
expected.getLimit().getRowCount());
+ LimitClauseAssert.assertOffset(assertContext,
actual.getLimit().get().getOffset().orElse(null),
expected.getLimit().getOffset());
+ } else {
+ assertNull(actual.getLimit().orElse(null),
assertContext.getText("Actual limit segment should not exist."));
+ }
+ }
+}
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 80b48824cd9..589e29fb41b 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
@@ -52,6 +52,7 @@ import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.s
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisDropSqlBlockRuleStatementTestCase;
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisShowCreateLoadStatementTestCase;
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisShowLoadStatementTestCase;
+import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisShowResourcesStatementTestCase;
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisShowLoadWarningsStatementTestCase;
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisShowStreamLoadStatementTestCase;
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisShowCreateRoutineLoadStatementTestCase;
@@ -597,6 +598,9 @@ public final class RootSQLParserTestCases {
@XmlElement(name = "stop-sync-job")
private final List<DorisStopSyncJobStatementTestCase> stopSyncJobTestCases
= new LinkedList<>();
+ @XmlElement(name = "doris-show-resources")
+ private final List<DorisShowResourcesStatementTestCase>
dorisShowResourcesTestCases = new LinkedList<>();
+
@XmlElement(name = "doris-show-load")
private final List<DorisShowLoadStatementTestCase> dorisShowLoadTestCases
= new LinkedList<>();
diff --git
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/segment/impl/show/ExpectedShowResourcesNameCondition.java
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/segment/impl/show/ExpectedShowResourcesNameCondition.java
new file mode 100644
index 00000000000..3a44f6e505f
--- /dev/null
+++
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/segment/impl/show/ExpectedShowResourcesNameCondition.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.cases.parser.jaxb.segment.impl.show;
+
+import lombok.Getter;
+import lombok.Setter;
+import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.AbstractExpectedSQLSegment;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ * Expected show resources name condition.
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@Getter
+@Setter
+public final class ExpectedShowResourcesNameCondition extends
AbstractExpectedSQLSegment {
+
+ @XmlAttribute
+ private String type;
+
+ @XmlAttribute
+ private String value;
+}
diff --git
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/segment/impl/show/ExpectedShowResourcesResourceTypeCondition.java
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/segment/impl/show/ExpectedShowResourcesResourceTypeCondition.java
new file mode 100644
index 00000000000..cdcf76a4f9c
--- /dev/null
+++
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/segment/impl/show/ExpectedShowResourcesResourceTypeCondition.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.segment.impl.show;
+
+import lombok.Getter;
+import lombok.Setter;
+import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.AbstractExpectedSQLSegment;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ * Expected show resources resource type condition.
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@Getter
+@Setter
+public final class ExpectedShowResourcesResourceTypeCondition extends
AbstractExpectedSQLSegment {
+
+ @XmlAttribute
+ private String value;
+}
diff --git
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/dal/dialect/doris/DorisShowResourcesStatementTestCase.java
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/dal/dialect/doris/DorisShowResourcesStatementTestCase.java
new file mode 100644
index 00000000000..632177642c1
--- /dev/null
+++
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/dal/dialect/doris/DorisShowResourcesStatementTestCase.java
@@ -0,0 +1,52 @@
+/*
+ * 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
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.like.ExpectedLikeClause;
+import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.limit.ExpectedLimitClause;
+import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.orderby.ExpectedOrderByClause;
+import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.show.ExpectedShowResourcesNameCondition;
+import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.show.ExpectedShowResourcesResourceTypeCondition;
+
+import javax.xml.bind.annotation.XmlElement;
+
+/**
+ * Show resources statement test case for Doris.
+ */
+@Getter
+@Setter
+public final class DorisShowResourcesStatementTestCase extends
SQLParserTestCase {
+
+ @XmlElement(name = "name-condition")
+ private ExpectedShowResourcesNameCondition nameCondition;
+
+ @XmlElement(name = "resource-type-condition")
+ private ExpectedShowResourcesResourceTypeCondition resourceTypeCondition;
+
+ @XmlElement(name = "like")
+ private ExpectedLikeClause like;
+
+ @XmlElement(name = "order-by")
+ private ExpectedOrderByClause orderBy;
+
+ @XmlElement(name = "limit")
+ private ExpectedLimitClause limit;
+}
diff --git a/test/it/parser/src/main/resources/case/dal/show-resources.xml
b/test/it/parser/src/main/resources/case/dal/show-resources.xml
new file mode 100644
index 00000000000..16e4920c216
--- /dev/null
+++ b/test/it/parser/src/main/resources/case/dal/show-resources.xml
@@ -0,0 +1,73 @@
+<?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>
+ <doris-show-resources sql-case-id="doris_show_resources_simple" />
+
+ <doris-show-resources sql-case-id="doris_show_resources_where_name_eq">
+ <name-condition type="=" value="20140102" start-index="21"
stop-index="37" />
+ </doris-show-resources>
+
+ <doris-show-resources
sql-case-id="doris_show_resources_where_name_like_and_limit">
+ <name-condition type="LIKE" value="2014_01_02" start-index="21"
stop-index="42" />
+ <limit start-index="44" stop-index="51">
+ <row-count value="10" start-index="50" stop-index="51" />
+ </limit>
+ </doris-show-resources>
+
+ <doris-show-resources
sql-case-id="doris_show_resources_where_resourcetype">
+ <resource-type-condition value="spark" start-index="21"
stop-index="42" />
+ </doris-show-resources>
+
+ <doris-show-resources
sql-case-id="doris_show_resources_where_name_and_resourcetype">
+ <name-condition type="=" value="test_resource" start-index="21"
stop-index="42" />
+ <resource-type-condition value="jdbc" start-index="44" stop-index="64"
/>
+ </doris-show-resources>
+
+ <doris-show-resources
sql-case-id="doris_show_resources_where_eq_and_order_by">
+ <name-condition type="=" value="20140102" start-index="21"
stop-index="37" />
+ <order-by>
+ <column-item name="KEY" start-index="48" stop-index="52"
start-delimiter="`" end-delimiter="`" order-direction="DESC" />
+ </order-by>
+ </doris-show-resources>
+
+ <doris-show-resources sql-case-id="doris_show_resources_like">
+ <like pattern="jdbc%" start-index="15" stop-index="26" />
+ </doris-show-resources>
+
+ <doris-show-resources
sql-case-id="doris_show_resources_order_by_limit_offset">
+ <order-by>
+ <column-item name="KEY" start-index="24" stop-index="28"
start-delimiter="`" end-delimiter="`" order-direction="DESC" />
+ </order-by>
+ <limit start-index="35" stop-index="51">
+ <row-count value="10" start-index="41" stop-index="42" />
+ <offset value="5" start-index="51" stop-index="51" />
+ </limit>
+ </doris-show-resources>
+
+ <doris-show-resources sql-case-id="doris_show_resources_all_clauses">
+ <name-condition type="=" value="test" start-index="21" stop-index="33"
/>
+ <order-by>
+ <column-item name="KEY" start-index="44" stop-index="48"
start-delimiter="`" end-delimiter="`" order-direction="ASC" />
+ </order-by>
+ <limit start-index="54" stop-index="71">
+ <row-count value="20" start-index="60" stop-index="61" />
+ <offset value="10" start-index="70" stop-index="71" />
+ </limit>
+ </doris-show-resources>
+</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 f5cf0e8f3f6..8b77e81d0fc 100644
--- a/test/it/parser/src/main/resources/case/dml/select.xml
+++ b/test/it/parser/src/main/resources/case/dml/select.xml
@@ -10798,6 +10798,24 @@
</from>
</select>
+ <select sql-case-id="select_resources_as_identifier_doris">
+ <projections start-index="7" stop-index="15">
+ <column-projection name="resources" start-index="7"
stop-index="15" />
+ </projections>
+ <from start-index="22" stop-index="32">
+ <simple-table name="t_resources" start-index="22" stop-index="32"
/>
+ </from>
+ </select>
+
+ <select sql-case-id="select_resourcetype_as_identifier_doris">
+ <projections start-index="7" stop-index="18">
+ <column-projection name="resourcetype" start-index="7"
stop-index="18" />
+ </projections>
+ <from start-index="25" stop-index="38">
+ <simple-table name="t_resourcetype" start-index="25"
stop-index="38" />
+ </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" />
diff --git
a/test/it/parser/src/main/resources/sql/supported/dal/show-resources.xml
b/test/it/parser/src/main/resources/sql/supported/dal/show-resources.xml
new file mode 100644
index 00000000000..f277f0ae190
--- /dev/null
+++ b/test/it/parser/src/main/resources/sql/supported/dal/show-resources.xml
@@ -0,0 +1,29 @@
+<?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="doris_show_resources_simple" value="SHOW RESOURCES"
db-types="Doris" />
+ <sql-case id="doris_show_resources_where_name_eq" value="SHOW RESOURCES
WHERE NAME = "20140102"" db-types="Doris" />
+ <sql-case id="doris_show_resources_where_name_like_and_limit" value="SHOW
RESOURCES WHERE NAME LIKE "2014_01_02" LIMIT 10" db-types="Doris" />
+ <sql-case id="doris_show_resources_where_resourcetype" value="SHOW
RESOURCES WHERE RESOURCETYPE = "spark"" db-types="Doris" />
+ <sql-case id="doris_show_resources_where_name_and_resourcetype"
value="SHOW RESOURCES WHERE NAME = "test_resource" RESOURCETYPE =
"jdbc"" db-types="Doris" />
+ <sql-case id="doris_show_resources_where_eq_and_order_by" value="SHOW
RESOURCES WHERE NAME = "20140102" ORDER BY `KEY` DESC"
db-types="Doris" />
+ <sql-case id="doris_show_resources_like" value="SHOW RESOURCES LIKE
"jdbc%"" db-types="Doris" />
+ <sql-case id="doris_show_resources_order_by_limit_offset" value="SHOW
RESOURCES ORDER BY `KEY` DESC LIMIT 10 OFFSET 5" db-types="Doris" />
+ <sql-case id="doris_show_resources_all_clauses" value="SHOW RESOURCES
WHERE NAME = "test" ORDER BY `KEY` ASC LIMIT 20 OFFSET 10"
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 b4b13e7064d..ec822be77b1 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
@@ -505,6 +505,8 @@
<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_resources_as_identifier_doris" value="SELECT
resources FROM t_resources" db-types="Doris" />
+ <sql-case id="select_resourcetype_as_identifier_doris" value="SELECT
resourcetype FROM t_resourcetype" db-types="Doris" />
<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" />