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 740c22cafb9 Support for the BITMAP data type and the SHOW DATA SKEW 
statement for Doris (#39521)
740c22cafb9 is described below

commit 740c22cafb98b522ad95328c803368ee72576055
Author: Liang Zhang <[email protected]>
AuthorDate: Wed Aug 19 23:33:17 2026 +0800

    Support for the BITMAP data type and the SHOW DATA SKEW statement for Doris 
(#39521)
    
    fixes #31502
---
 .../src/main/antlr4/imports/doris/BaseRule.g4      |  9 ++++
 .../src/main/antlr4/imports/doris/DALStatement.g4  |  7 +++
 .../src/main/antlr4/imports/doris/DorisKeyword.g4  | 12 +++++
 .../statement/type/DorisDALStatementVisitor.java   | 12 +++++
 .../doris/dal/show/DorisShowDataSkewStatement.java | 63 ++++++++++++++++++++++
 .../dal/dialect/doris/DorisDALStatementAssert.java |  5 ++
 .../type/DorisShowDataSkewStatementAssert.java     | 60 +++++++++++++++++++++
 .../cases/parser/jaxb/RootSQLParserTestCases.java  |  4 ++
 .../show/DorisShowDataSkewStatementTestCase.java   | 42 +++++++++++++++
 .../it/parser/src/main/resources/case/dal/show.xml | 22 ++++++++
 .../src/main/resources/case/ddl/create-table.xml   | 13 +++++
 .../src/main/resources/sql/supported/dal/show.xml  |  4 ++
 .../resources/sql/supported/ddl/create-table.xml   |  1 +
 13 files changed, 254 insertions(+)

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 51bd0fda88d..310c7ab9d32 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
@@ -154,6 +154,9 @@ identifierKeywordsUnambiguous
     | BEFORE
     | BINLOG
     | BIT
+    // DORIS ADDED BEGIN
+    | BITMAP
+    // DORIS ADDED END
     | BITMAP_UNION
     // DORIS ADDED BEGIN
     | BITXOR
@@ -499,6 +502,9 @@ identifierKeywordsUnambiguous
     | SERVER
     | SHARE
     | SIMPLE
+    // DORIS ADDED BEGIN
+    | SKEW
+    // DORIS ADDED END
     | SKIP_SYMBOL
     | SLOW
     | SNAPSHOT
@@ -1419,6 +1425,9 @@ dataType
     | dataTypeName = (SERIAL | JSON | GEOMETRY | GEOMCOLLECTION | 
GEOMETRYCOLLECTION | POINT | MULTIPOINT | LINESTRING | MULTILINESTRING | 
POLYGON | MULTIPOLYGON)
     | dataTypeName = STRING
     | dataTypeName = ARRAY
+    // DORIS ADDED BEGIN
+    | dataTypeName = BITMAP
+    // DORIS ADDED END
     ;
 
 stringList
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 7b0117d2fc1..78f86b09de6 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
@@ -303,6 +303,12 @@ showData
     : SHOW DATA (FROM tableName)? orderByClause?
     ;
 
+// DORIS ADDED BEGIN
+showDataSkew
+    : SHOW DATA SKEW fromTable (PARTITION LP_ partitionName (COMMA_ 
partitionName)* RP_)?
+    ;
+// DORIS ADDED END
+
 showTrash
     : SHOW TRASH (ON (LP_ string_ (COMMA_ string_)* RP_ | string_))?
     ;
@@ -1011,5 +1017,6 @@ show
     // DORIS ADDED BEGIN
     | showResources
     | showTransaction
+    | showDataSkew
     // 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 012cec777c2..d65a309cd48 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
@@ -189,6 +189,12 @@ BIT
     : B I T
     ;
 
+// DORIS ADDED BEGIN
+BITMAP
+    : B I T M A P
+    ;
+// DORIS ADDED END
+
 BITMAP_UNION
     : B I T M A P UL_ U N I O N
     ;
@@ -2614,6 +2620,12 @@ SKIP_SYMBOL
     : S K I P
     ;
 
+// DORIS ADDED BEGIN
+SKEW
+    : S K E W
+    ;
+// DORIS ADDED END
+
 SLAVE
     : S L A V E
     ;
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 f4e1f59b98b..760dfaf3de1 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
@@ -163,6 +163,7 @@ import 
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.Propert
 import 
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.PropertyContext;
 import 
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.DorisAlterSystemActionContext;
 import 
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.ShowQueryStatsContext;
+import 
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.ShowDataSkewContext;
 import 
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.ShowProcContext;
 import 
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.ShowSyncJobContext;
 import 
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.ShowDataTypesContext;
@@ -293,6 +294,7 @@ import 
org.apache.shardingsphere.sql.parser.statement.core.segment.dal.Repositor
 import 
org.apache.shardingsphere.sql.parser.statement.core.statement.type.dal.ShowBuildIndexStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.core.statement.type.dal.ShowAlterTableStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.doris.dal.show.DorisShowQueryStatsStatement;
+import 
org.apache.shardingsphere.sql.parser.statement.doris.dal.show.DorisShowDataSkewStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.mysql.dal.MySQLCloneStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.mysql.dal.MySQLCreateLoadableFunctionStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.mysql.dal.MySQLDelimiterStatement;
@@ -1155,6 +1157,16 @@ public final class DorisDALStatementVisitor extends 
DorisStatementVisitor implem
         return result;
     }
     
+    @Override
+    public ASTNode visitShowDataSkew(final ShowDataSkewContext ctx) {
+        SimpleTableSegment table = ((FromTableSegment) 
visit(ctx.fromTable())).getTable();
+        Collection<PartitionSegment> partitions = 
ctx.partitionName().isEmpty() ? Collections.emptyList()
+                : ctx.partitionName().stream().map(each -> (PartitionSegment) 
visit(each)).collect(Collectors.toList());
+        DorisShowDataSkewStatement result = new 
DorisShowDataSkewStatement(getDatabaseType(), table, partitions);
+        result.addParameterMarkers(getParameterMarkerSegments());
+        return result;
+    }
+    
     @Override
     public ASTNode visitCreateLoadableFunction(final 
CreateLoadableFunctionContext ctx) {
         return new MySQLCreateLoadableFunctionStatement(getDatabaseType());
diff --git 
a/parser/sql/statement/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/statement/doris/dal/show/DorisShowDataSkewStatement.java
 
b/parser/sql/statement/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/statement/doris/dal/show/DorisShowDataSkewStatement.java
new file mode 100644
index 00000000000..b5cb4713a40
--- /dev/null
+++ 
b/parser/sql/statement/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/statement/doris/dal/show/DorisShowDataSkewStatement.java
@@ -0,0 +1,63 @@
+/*
+ * 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.show;
+
+import lombok.Getter;
+import org.apache.shardingsphere.database.connector.core.type.DatabaseType;
+import 
org.apache.shardingsphere.sql.parser.statement.core.segment.dal.PartitionSegment;
+import 
org.apache.shardingsphere.sql.parser.statement.core.segment.generic.table.SimpleTableSegment;
+import 
org.apache.shardingsphere.sql.parser.statement.core.statement.attribute.SQLStatementAttributes;
+import 
org.apache.shardingsphere.sql.parser.statement.core.statement.attribute.type.AllowNotUseDatabaseSQLStatementAttribute;
+import 
org.apache.shardingsphere.sql.parser.statement.core.statement.attribute.type.DatabaseSelectRequiredSQLStatementAttribute;
+import 
org.apache.shardingsphere.sql.parser.statement.core.statement.attribute.type.TableSQLStatementAttribute;
+import 
org.apache.shardingsphere.sql.parser.statement.core.statement.attribute.type.TablelessDataSourceBroadcastRouteSQLStatementAttribute;
+import 
org.apache.shardingsphere.sql.parser.statement.core.statement.type.dal.DALStatement;
+
+import java.util.Collection;
+import java.util.Optional;
+
+/**
+ * Show data skew statement for Doris.
+ */
+@Getter
+public final class DorisShowDataSkewStatement extends DALStatement {
+    
+    private final SimpleTableSegment table;
+    
+    private final Collection<PartitionSegment> partitions;
+    
+    private final SQLStatementAttributes attributes;
+    
+    public DorisShowDataSkewStatement(final DatabaseType databaseType, final 
SimpleTableSegment table, final Collection<PartitionSegment> partitions) {
+        super(databaseType);
+        this.table = table;
+        this.partitions = partitions;
+        String databaseName = null == table || !table.getOwner().isPresent() ? 
null : table.getOwner().get().getIdentifier().getValue();
+        attributes = new SQLStatementAttributes(new 
DatabaseSelectRequiredSQLStatementAttribute(), new 
TableSQLStatementAttribute(table),
+                new TablelessDataSourceBroadcastRouteSQLStatementAttribute(), 
new AllowNotUseDatabaseSQLStatementAttribute(true, databaseName));
+    }
+    
+    /**
+     * Get table.
+     *
+     * @return table
+     */
+    public Optional<SimpleTableSegment> getTable() {
+        return Optional.ofNullable(table);
+    }
+}
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 1793d409015..504976df8f2 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
@@ -60,6 +60,7 @@ import 
org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisShowFileSta
 import 
org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisShowSyncJobStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisSwitchStatement;
 import 
org.apache.shardingsphere.sql.parser.statement.doris.dal.show.DorisShowQueryStatsStatement;
+import 
org.apache.shardingsphere.sql.parser.statement.doris.dal.show.DorisShowDataSkewStatement;
 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.DorisAdminRebalanceDiskStatementAssert;
@@ -96,6 +97,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.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;
+import 
org.apache.shardingsphere.test.it.sql.parser.internal.asserts.statement.dal.dialect.doris.type.DorisShowDataSkewStatementAssert;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.asserts.statement.dal.dialect.doris.type.DorisShowEncryptKeysStatementAssert;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.asserts.statement.dal.dialect.doris.type.DorisShowFileStatementAssert;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.asserts.statement.dal.dialect.doris.type.DorisShowSyncJobStatementAssert;
@@ -142,6 +144,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.DorisSwitchStatementTestCase;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisUnsetVariableStatementTestCase;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.show.DorisShowQueryStatsStatementTestCase;
+import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.show.DorisShowDataSkewStatementTestCase;
 
 /**
  * DAL statement assert for Doris.
@@ -167,6 +170,8 @@ public final class DorisDALStatementAssert {
             DorisCreateWorkloadGroupStatementAssert.assertIs(assertContext, 
(DorisCreateWorkloadGroupStatement) actual, 
(DorisCreateWorkloadGroupStatementTestCase) expected);
         } else if (actual instanceof DorisShowQueryStatsStatement) {
             DorisShowQueryStatsStatementAssert.assertIs(assertContext, 
(DorisShowQueryStatsStatement) actual, (DorisShowQueryStatsStatementTestCase) 
expected);
+        } else if (actual instanceof DorisShowDataSkewStatement) {
+            DorisShowDataSkewStatementAssert.assertIs(assertContext, 
(DorisShowDataSkewStatement) actual, (DorisShowDataSkewStatementTestCase) 
expected);
         } else if (actual instanceof DorisSwitchStatement) {
             DorisSwitchStatementAssert.assertIs(assertContext, 
(DorisSwitchStatement) actual, (DorisSwitchStatementTestCase) expected);
         } else if (actual instanceof UnsetVariableStatement) {
diff --git 
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dal/dialect/doris/type/DorisShowDataSkewStatementAssert.java
 
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dal/dialect/doris/type/DorisShowDataSkewStatementAssert.java
new file mode 100644
index 00000000000..5423ab2e2b1
--- /dev/null
+++ 
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dal/dialect/doris/type/DorisShowDataSkewStatementAssert.java
@@ -0,0 +1,60 @@
+/*
+ * 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.core.segment.dal.PartitionSegment;
+import 
org.apache.shardingsphere.sql.parser.statement.doris.dal.show.DorisShowDataSkewStatement;
+import 
org.apache.shardingsphere.test.it.sql.parser.internal.asserts.SQLCaseAssertContext;
+import 
org.apache.shardingsphere.test.it.sql.parser.internal.asserts.segment.partition.PartitionAssert;
+import 
org.apache.shardingsphere.test.it.sql.parser.internal.asserts.segment.table.TableAssert;
+import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.show.DorisShowDataSkewStatementTestCase;
+
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+/**
+ * Show data skew statement assert for Doris.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class DorisShowDataSkewStatementAssert {
+    
+    /**
+     * Assert show data skew statement is correct with expected parser result.
+     *
+     * @param assertContext assert context
+     * @param actual actual show data skew statement
+     * @param expected expected show data skew statement test case
+     */
+    public static void assertIs(final SQLCaseAssertContext assertContext, 
final DorisShowDataSkewStatement actual, final 
DorisShowDataSkewStatementTestCase expected) {
+        if (null != expected.getTable()) {
+            TableAssert.assertIs(assertContext, 
actual.getTable().orElse(null), expected.getTable());
+        }
+        assertPartitions(assertContext, actual, expected);
+    }
+    
+    private static void assertPartitions(final SQLCaseAssertContext 
assertContext, final DorisShowDataSkewStatement actual, final 
DorisShowDataSkewStatementTestCase expected) {
+        assertThat(assertContext.getText("Assertion error: partition size does 
not match."), actual.getPartitions().size(), 
is(expected.getPartitions().size()));
+        int count = 0;
+        for (PartitionSegment each : actual.getPartitions()) {
+            PartitionAssert.assertIs(assertContext, each, 
expected.getPartitions().get(count));
+            count++;
+        }
+    }
+}
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 2a14a38b33b..5400b91a367 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
@@ -70,6 +70,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.DorisSyncStatementTestCase;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisUnsetVariableStatementTestCase;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.show.DorisShowQueryStatsStatementTestCase;
+import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.show.DorisShowDataSkewStatementTestCase;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.mysql.MySQLCloneStatementTestCase;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.mysql.MySQLCreateLoadableFunctionTestCase;
 import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.mysql.MySQLDelimiterStatementTestCase;
@@ -1587,6 +1588,9 @@ public final class RootSQLParserTestCases {
     @XmlElement(name = "show-query-stats")
     private final List<DorisShowQueryStatsStatementTestCase> 
showQueryStatsTestCases = new LinkedList<>();
     
+    @XmlElement(name = "show-data-skew")
+    private final List<DorisShowDataSkewStatementTestCase> 
showDataSkewTestCases = new LinkedList<>();
+    
     @XmlElement(name = "doris-show-functions")
     private final List<DorisShowFunctionsStatementTestCase> 
dorisShowFunctionsTestCases = 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/show/DorisShowDataSkewStatementTestCase.java
 
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/dal/dialect/doris/show/DorisShowDataSkewStatementTestCase.java
new file mode 100644
index 00000000000..d6d279a2793
--- /dev/null
+++ 
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/dal/dialect/doris/show/DorisShowDataSkewStatementTestCase.java
@@ -0,0 +1,42 @@
+/*
+ * 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.show;
+
+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.index.ExpectedPartition;
+import 
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.table.ExpectedSimpleTable;
+
+import javax.xml.bind.annotation.XmlElement;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * Show data skew statement test case for Doris.
+ */
+@Getter
+@Setter
+public final class DorisShowDataSkewStatementTestCase extends 
SQLParserTestCase {
+    
+    @XmlElement(name = "table")
+    private ExpectedSimpleTable table;
+    
+    @XmlElement(name = "partition")
+    private List<ExpectedPartition> partitions = new LinkedList<>();
+}
diff --git a/test/it/parser/src/main/resources/case/dal/show.xml 
b/test/it/parser/src/main/resources/case/dal/show.xml
index b0c97ccba23..774aa644e34 100644
--- a/test/it/parser/src/main/resources/case/dal/show.xml
+++ b/test/it/parser/src/main/resources/case/dal/show.xml
@@ -1152,6 +1152,28 @@
         </from>
     </show-query-stats>
 
+    <show-data-skew sql-case-id="show_data_skew_from_table">
+        <table name="test_show_data_skew" start-index="20" stop-index="38" />
+    </show-data-skew>
+
+    <show-data-skew sql-case-id="show_data_skew_from_table_with_db">
+        <table name="test_table" start-index="20" stop-index="37">
+            <owner name="test_db" start-index="20" stop-index="26" />
+        </table>
+    </show-data-skew>
+
+    <show-data-skew sql-case-id="show_data_skew_from_table_with_partition">
+        <table name="test_table" start-index="20" stop-index="29" />
+        <partition name="p1" start-index="42" stop-index="43" />
+    </show-data-skew>
+
+    <show-data-skew sql-case-id="show_data_skew_from_table_with_partitions">
+        <table name="test_table" start-index="20" stop-index="29" />
+        <partition name="p1" start-index="42" stop-index="43" />
+        <partition name="p2" start-index="46" stop-index="47" />
+        <partition name="p3" start-index="50" stop-index="51" />
+    </show-data-skew>
+
     <show-sql-block-rule sql-case-id="show_sql_block_rule" />
 
     <show-sql-block-rule sql-case-id="show_sql_block_rule_for">
diff --git a/test/it/parser/src/main/resources/case/ddl/create-table.xml 
b/test/it/parser/src/main/resources/case/ddl/create-table.xml
index f41fd614bc4..a6e0ebb5a82 100644
--- a/test/it/parser/src/main/resources/case/ddl/create-table.xml
+++ b/test/it/parser/src/main/resources/case/ddl/create-table.xml
@@ -2395,6 +2395,19 @@
         </column-definition>
     </create-table>
 
+    <create-table sql-case-id="create_table_with_bitmap_type_doris" 
db-types="Doris">
+        <table name="create_table_use_bitmap" start-index="13" stop-index="35" 
/>
+        <column-definition type="INT" start-index="38" stop-index="43">
+            <column name="id" start-index="38" stop-index="39" />
+        </column-definition>
+        <column-definition type="BITMAP" start-index="46" stop-index="54">
+            <column name="v1" start-index="46" stop-index="47" />
+        </column-definition>
+        <column-definition type="BITMAP" agg-type="BITMAP_UNION" 
start-index="57" stop-index="78">
+            <column name="v2" start-index="57" stop-index="58" />
+        </column-definition>
+    </create-table>
+
     <create-table 
sql-case-id="create_table_multi_range_partition_integer_doris" db-types="Doris">
         <table name="create_table_multi_partion_integer" start-index="13" 
stop-index="46" />
         <column-definition type="BIGINT" start-index="49" stop-index="57">
diff --git a/test/it/parser/src/main/resources/sql/supported/dal/show.xml 
b/test/it/parser/src/main/resources/sql/supported/dal/show.xml
index e2f38dce714..c09a9c46c49 100644
--- a/test/it/parser/src/main/resources/sql/supported/dal/show.xml
+++ b/test/it/parser/src/main/resources/sql/supported/dal/show.xml
@@ -269,6 +269,10 @@
     <sql-case id="show_slave_hosts_doris" value="SHOW SLAVE HOSTS" 
db-types="Doris" />
     <sql-case id="show_replica_status_doris" value="SHOW REPLICA STATUS" 
db-types="Doris" />
     <sql-case id="show_relaylog_events_doris" value="SHOW RELAYLOG EVENTS" 
db-types="Doris" />
+    <sql-case id="show_data_skew_from_table" value="SHOW DATA SKEW FROM 
test_show_data_skew" db-types="Doris" />
+    <sql-case id="show_data_skew_from_table_with_db" value="SHOW DATA SKEW 
FROM test_db.test_table" db-types="Doris" />
+    <sql-case id="show_data_skew_from_table_with_partition" value="SHOW DATA 
SKEW FROM test_table PARTITION (p1)" db-types="Doris" />
+    <sql-case id="show_data_skew_from_table_with_partitions" value="SHOW DATA 
SKEW FROM test_table PARTITION (p1, p2, p3)" db-types="Doris" />
     <sql-case id="show_sql_block_rule" value="SHOW SQL_BLOCK_RULE" 
db-types="Doris" />
     <sql-case id="show_sql_block_rule_for" value="SHOW SQL_BLOCK_RULE FOR 
test_rule2" db-types="Doris" />
     <sql-case id="show_routine_load_task" value="SHOW ROUTINE LOAD TASK WHERE 
JobName = &quot;test1&quot;" db-types="Doris" />
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/create-table.xml 
b/test/it/parser/src/main/resources/sql/supported/ddl/create-table.xml
index bea57e92172..0b0936a8842 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/create-table.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/create-table.xml
@@ -176,6 +176,7 @@
     <sql-case id="create_table_partition_with_storage_policy_doris" 
value="CREATE TABLE create_table_partion_use_created_policy (k1 DATE, k2 INT, 
V1 VARCHAR(2048) REPLACE) PARTITION BY RANGE (k1) (PARTITION p1 VALUES LESS 
THAN ('2022-01-01') ('storage_policy' = 
'test_create_table_partition_use_policy_1', 'replication_num'='1'), PARTITION 
p2 VALUES LESS THAN ('2022-02-01') ('storage_policy' = 
'test_create_table_partition_use_policy_2', 'replication_num'='1')) DISTRIBUTED 
BY HASH(k2) BUCKE [...]
     <sql-case id="create_table_multi_range_partition_date_doris" value="CREATE 
TABLE create_table_multi_partion_date (k1 DATE, k2 INT, V1 VARCHAR(20)) 
PARTITION BY RANGE (k1) (FROM ('2000-11-14') TO ('2021-11-14') INTERVAL 1 YEAR, 
FROM ('2021-11-14') TO ('2022-11-14') INTERVAL 1 MONTH, FROM ('2022-11-14') TO 
('2023-01-03') INTERVAL 1 WEEK, FROM ('2023-01-03') TO ('2023-01-14') INTERVAL 
1 DAY, PARTITION p_20230114 VALUES [('2023-01-14'), ('2023-01-15'))) 
DISTRIBUTED BY HASH(k2) BUCKETS 1  [...]
     <sql-case id="create_table_multi_range_partition_hour_doris" value="CREATE 
TABLE create_table_multi_partion_date_hour (k1 DATETIME, k2 INT, V1 
VARCHAR(20)) PARTITION BY RANGE (k1) (FROM ('2023-01-03 12') TO ('2023-01-14 
22') INTERVAL 1 HOUR) DISTRIBUTED BY HASH(k2) BUCKETS 1 
PROPERTIES('replication_num' = '1')" db-types="Doris" />
+    <sql-case id="create_table_with_bitmap_type_doris" value="CREATE TABLE 
create_table_use_bitmap (id INT, v1 BITMAP, v2 BITMAP BITMAP_UNION) DISTRIBUTED 
BY HASH(id) BUCKETS 1" db-types="Doris" />
     <sql-case id="create_table_multi_range_partition_integer_doris" 
value="CREATE TABLE create_table_multi_partion_integer (k1 BIGINT, k2 INT, V1 
VARCHAR(20)) PARTITION BY RANGE (k1) (FROM (1) TO (100) INTERVAL 10) 
DISTRIBUTED BY HASH(k2) BUCKETS 1 PROPERTIES('replication_num' = '1')" 
db-types="Doris" />
     <sql-case 
id="create_table_as_select_with_key_partition_distribution_properties_doris" 
value="CREATE TABLE t_user (dt DATE, id INT, name VARCHAR(20)) ENGINE=OLAP 
UNIQUE KEY(dt, id) COMMENT &quot;OLAP&quot; PARTITION BY RANGE(dt) (FROM 
(&quot;2020-01-01&quot;) TO (&quot;2021-12-31&quot;) INTERVAL 1 YEAR) 
DISTRIBUTED BY HASH(id) BUCKETS 1 
PROPERTIES(&quot;replication_num&quot;=&quot;1&quot;) AS SELECT 
cast('2020-05-20' as date) as dt, 1 as id, 'Tom' as name" db-types="Doris" />
     <sql-case 
id="create_table_as_select_with_duplicate_key_multi_columns_doris" 
value="CREATE TABLE t_dup_user (dt DATE, id INT) ENGINE=OLAP DUPLICATE KEY(dt, 
id) DISTRIBUTED BY HASH(id) BUCKETS 1 AS SELECT cast('2020-05-20' as date) as 
dt, 1 as id" db-types="Doris" />

Reply via email to