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 6c30c5cf3d7 Support for the SWITCH statement and the CREATE INDEX
statement (#37561)
6c30c5cf3d7 is described below
commit 6c30c5cf3d7d9f310f12688ee8d7cb1f344091b6
Author: cxy <[email protected]>
AuthorDate: Tue Dec 30 19:03:52 2025 +0800
Support for the SWITCH statement and the CREATE INDEX statement (#37561)
* Support for the SWITCH statement and the CREATE INDEX statement
* Support for the SWITCH statement and the CREATE INDEX statement
* Support for the SWITCH statement and the CREATE INDEX statement
---
.../core/database/visitor/SQLVisitorRule.java | 2 +
.../src/main/antlr4/imports/doris/BaseRule.g4 | 3 +
.../src/main/antlr4/imports/doris/DALStatement.g4 | 4 ++
.../src/main/antlr4/imports/doris/DDLStatement.g4 | 6 +-
.../src/main/antlr4/imports/doris/DorisKeyword.g4 | 16 ++++++
.../sql/parser/autogen/DorisStatement.g4 | 1 +
.../statement/type/DorisDALStatementVisitor.java | 7 +++
.../statement/type/DorisDDLStatementVisitor.java | 13 +++++
.../type/ddl/index/CreateIndexStatement.java | 7 +++
.../statement/doris/dal/DorisSwitchStatement.java | 36 ++++++++++++
.../dal/dialect/doris/DorisDALStatementAssert.java | 5 ++
.../doris/type/DorisSwitchStatementAssert.java | 45 +++++++++++++++
.../standard/type/CreateIndexStatementAssert.java | 39 +++++++++++++
.../cases/parser/jaxb/RootSQLParserTestCases.java | 4 ++
.../segment/impl/distsql/ExpectedProperties.java | 40 ++++++++++++++
.../doris/DorisSwitchStatementTestCase.java} | 30 ++--------
.../index/CreateIndexStatementTestCase.java | 14 +++++
.../src/main/resources/case/dal/switch-catalog.xml | 23 ++++++++
.../src/main/resources/case/ddl/create-index.xml | 64 ++++++++++++++++++++++
.../resources/sql/supported/dal/switch-catalog.xml | 21 +++++++
.../resources/sql/supported/ddl/create-index.xml | 7 +++
21 files changed, 362 insertions(+), 25 deletions(-)
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 c4dcca230a1..52b38806f69 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
@@ -727,6 +727,8 @@ public enum SQLVisitorRule {
SWITCH("Switch", SQLStatementType.DDL),
+ SWITCH_CATALOG("SwitchCatalog", SQLStatementType.DAL),
+
CREATE_PROFILE("CreateProfile", SQLStatementType.DDL),
UPDATE_STATISTICS("UpdateStatistics", SQLStatementType.DDL),
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 1e654b4c27e..47e75d540f1 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
@@ -141,6 +141,7 @@ identifierKeywordsUnambiguous
| ALIAS
// DORIS ADDED END
| ALWAYS
+ | ANN
| ANY
| ARRAY
| AT
@@ -272,6 +273,7 @@ identifierKeywordsUnambiguous
// DORIS ADDED BEGIN
| INSTR
// DORIS ADDED END
+ | INVERTED
| INVISIBLE
| INVOKER
| IO
@@ -352,6 +354,7 @@ identifierKeywordsUnambiguous
| NEVER
| NEW
| NEXT
+ | NGRAM_BF
| NODEGROUP
| NOWAIT
| NO_WAIT
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 d20917fb59a..675f12a3dc0 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
@@ -23,6 +23,10 @@ use
: USE databaseName
;
+switchCatalog
+ : SWITCH catalogName
+ ;
+
help
: HELP textOrIdentifier
;
diff --git
a/parser/sql/engine/dialect/doris/src/main/antlr4/imports/doris/DDLStatement.g4
b/parser/sql/engine/dialect/doris/src/main/antlr4/imports/doris/DDLStatement.g4
index 260df85b675..6d9d00b989d 100644
---
a/parser/sql/engine/dialect/doris/src/main/antlr4/imports/doris/DDLStatement.g4
+++
b/parser/sql/engine/dialect/doris/src/main/antlr4/imports/doris/DDLStatement.g4
@@ -248,7 +248,11 @@ truncateTable
;
createIndex
- : CREATE createIndexSpecification? INDEX indexName indexTypeClause? ON
tableName keyListWithExpression indexOption? algorithmOptionAndLockOption?
+ : CREATE createIndexSpecification? INDEX ifNotExists? indexName ON
tableName keyListWithExpression (indexTypeClause | dorisIndexTypeClause)?
propertiesClause? commentClause? algorithmOptionAndLockOption?
+ ;
+
+dorisIndexTypeClause
+ : USING (INVERTED | NGRAM_BF | ANN)
;
createDatabase
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 0f4cf009817..447347830c6 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
@@ -79,6 +79,10 @@ AND
: A N D
;
+ANN
+ : A N N
+ ;
+
ANY
: A N Y
;
@@ -1127,6 +1131,9 @@ INSTR
;
// DORIS ADDED END
+INVERTED
+ : I N V E R T E D
+ ;
INT
: I N T
@@ -1702,6 +1709,11 @@ NEXT
: N E X T
;
+NGRAM_BF
+ : N G R A M UL_ B F
+ ;
+
+
NO
: N O
;
@@ -2686,6 +2698,10 @@ SWAPS
: S W A P S
;
+SWITCH
+ : S W I T C H
+ ;
+
SWITCHES
: S W I T C H E S
;
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 c90e153f7fe..b5cb0a4f144 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
@@ -99,6 +99,7 @@ execute
| shutdown
| begin
| use
+ | switchCatalog
| explain
| doStatement
| show
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 bd40ab01c8f..ff201872e7f 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
@@ -116,6 +116,7 @@ import
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.ShowWhe
import
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.ShutdownContext;
import
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.StartSlaveContext;
import
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.StopSlaveContext;
+import
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.SwitchCatalogContext;
import
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.TablesOptionContext;
import
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.UninstallComponentContext;
import
org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.UninstallPluginContext;
@@ -181,6 +182,7 @@ import
org.apache.shardingsphere.sql.parser.statement.core.value.literal.impl.Te
import
org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisAlterResourceStatement;
import
org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisAlterSystemStatement;
import
org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisCreateSqlBlockRuleStatement;
+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.mysql.dal.MySQLCloneStatement;
import
org.apache.shardingsphere.sql.parser.statement.mysql.dal.MySQLCreateLoadableFunctionStatement;
@@ -579,6 +581,11 @@ public final class DorisDALStatementVisitor extends
DorisStatementVisitor implem
return new MySQLUseStatement(getDatabaseType(), ((DatabaseSegment)
visit(ctx.databaseName())).getIdentifier().getValue());
}
+ @Override
+ public ASTNode visitSwitchCatalog(final SwitchCatalogContext ctx) {
+ return new DorisSwitchStatement(getDatabaseType(), ((IdentifierValue)
visit(ctx.catalogName())).getValue());
+ }
+
@Override
public ASTNode visitExplain(final ExplainContext ctx) {
return null == ctx.tableName()
diff --git
a/parser/sql/engine/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/engine/doris/visitor/statement/type/DorisDDLStatementVisitor.java
b/parser/sql/engine/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/engine/doris/visitor/statement/type/DorisDDLStatementVisitor.java
index a0a457b06f8..297458a7722 100644
---
a/parser/sql/engine/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/engine/doris/visitor/statement/type/DorisDDLStatementVisitor.java
+++
b/parser/sql/engine/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/engine/doris/visitor/statement/type/DorisDDLStatementVisitor.java
@@ -741,9 +741,22 @@ public final class DorisDDLStatementVisitor extends
DorisStatementVisitor implem
public ASTNode visitCreateIndex(final CreateIndexContext ctx) {
CreateIndexStatement result = new
CreateIndexStatement(getDatabaseType());
result.setTable((SimpleTableSegment) visit(ctx.tableName()));
+ result.setIfNotExists(null != ctx.ifNotExists());
IndexNameSegment indexName = new
IndexNameSegment(ctx.indexName().start.getStartIndex(),
ctx.indexName().stop.getStopIndex(), new
IdentifierValue(ctx.indexName().getText()));
result.setIndex(new
IndexSegment(ctx.indexName().start.getStartIndex(),
ctx.indexName().stop.getStopIndex(), indexName));
result.getColumns().addAll(((CollectionValue)
visit(ctx.keyListWithExpression())).getValue());
+ if (null != ctx.dorisIndexTypeClause()) {
+
result.setIndexType(ctx.dorisIndexTypeClause().getStop().getText());
+ }
+ if (null != ctx.propertiesClause()) {
+
result.setProperties(extractPropertiesSegment(ctx.propertiesClause()));
+ }
+ if (null != ctx.commentClause() && null !=
ctx.commentClause().literals()) {
+ String commentText =
SQLUtils.getExactlyValue(ctx.commentClause().literals().getText());
+ result.setComment(commentText);
+ CommentSegment commentSegment = new CommentSegment(commentText,
ctx.commentClause().literals().getStart().getStartIndex(),
ctx.commentClause().literals().getStop().getStopIndex());
+ result.getComments().add(commentSegment);
+ }
if (null != ctx.algorithmOptionAndLockOption()) {
if (null !=
ctx.algorithmOptionAndLockOption().alterAlgorithmOption()) {
result.setAlgorithmType((AlgorithmTypeSegment)
visit(ctx.algorithmOptionAndLockOption().alterAlgorithmOption()));
diff --git
a/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/type/ddl/index/CreateIndexStatement.java
b/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/type/ddl/index/CreateIndexStatement.java
index c9aeb62dd35..22e8379d9f9 100644
---
a/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/type/ddl/index/CreateIndexStatement.java
+++
b/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/type/ddl/index/CreateIndexStatement.java
@@ -22,6 +22,7 @@ import lombok.Setter;
import org.apache.shardingsphere.database.connector.core.type.DatabaseType;
import
org.apache.shardingsphere.sql.parser.statement.core.segment.ddl.index.IndexNameSegment;
import
org.apache.shardingsphere.sql.parser.statement.core.segment.ddl.index.IndexSegment;
+import
org.apache.shardingsphere.sql.parser.statement.core.segment.ddl.property.PropertiesSegment;
import
org.apache.shardingsphere.sql.parser.statement.core.segment.ddl.table.AlgorithmTypeSegment;
import
org.apache.shardingsphere.sql.parser.statement.core.segment.ddl.table.LockTableSegment;
import
org.apache.shardingsphere.sql.parser.statement.core.segment.dml.column.ColumnSegment;
@@ -59,6 +60,12 @@ public final class CreateIndexStatement extends DDLStatement
{
private final Collection<ColumnSegment> columns = new LinkedList<>();
+ private String indexType;
+
+ private PropertiesSegment properties;
+
+ private String comment;
+
public CreateIndexStatement(final DatabaseType databaseType) {
super(databaseType);
}
diff --git
a/parser/sql/statement/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/statement/doris/dal/DorisSwitchStatement.java
b/parser/sql/statement/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/statement/doris/dal/DorisSwitchStatement.java
new file mode 100644
index 00000000000..c055300eecd
--- /dev/null
+++
b/parser/sql/statement/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/statement/doris/dal/DorisSwitchStatement.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;
+
+/**
+ * Switch catalog statement for Doris.
+ */
+@Getter
+public final class DorisSwitchStatement extends DALStatement {
+
+ private final String catalogName;
+
+ public DorisSwitchStatement(final DatabaseType databaseType, final String
catalogName) {
+ super(databaseType);
+ this.catalogName = catalogName;
+ }
+}
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 b3cf9727bd1..349f6670370 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
@@ -23,16 +23,19 @@ import
org.apache.shardingsphere.sql.parser.statement.core.statement.type.dal.DA
import
org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisAlterResourceStatement;
import
org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisAlterSystemStatement;
import
org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisCreateSqlBlockRuleStatement;
+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.test.it.sql.parser.internal.asserts.SQLCaseAssertContext;
import
org.apache.shardingsphere.test.it.sql.parser.internal.asserts.statement.dal.dialect.doris.type.DorisAlterResourceStatementAssert;
import
org.apache.shardingsphere.test.it.sql.parser.internal.asserts.statement.dal.dialect.doris.type.DorisAlterSystemStatementAssert;
import
org.apache.shardingsphere.test.it.sql.parser.internal.asserts.statement.dal.dialect.doris.type.DorisCreateSqlBlockRuleStatementAssert;
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.DorisSwitchStatementAssert;
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.DorisAlterResourceStatementTestCase;
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisAlterSystemStatementTestCase;
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisCreateSqlBlockRuleStatementTestCase;
+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.show.DorisShowQueryStatsStatementTestCase;
/**
@@ -57,6 +60,8 @@ public final class DorisDALStatementAssert {
DorisCreateSqlBlockRuleStatementAssert.assertIs(assertContext,
(DorisCreateSqlBlockRuleStatement) actual,
(DorisCreateSqlBlockRuleStatementTestCase) expected);
} else if (actual instanceof DorisShowQueryStatsStatement) {
DorisShowQueryStatsStatementAssert.assertIs(assertContext,
(DorisShowQueryStatsStatement) actual, (DorisShowQueryStatsStatementTestCase)
expected);
+ } else if (actual instanceof DorisSwitchStatement) {
+ DorisSwitchStatementAssert.assertIs(assertContext,
(DorisSwitchStatement) actual, (DorisSwitchStatementTestCase) expected);
}
}
}
diff --git
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dal/dialect/doris/type/DorisSwitchStatementAssert.java
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dal/dialect/doris/type/DorisSwitchStatementAssert.java
new file mode 100644
index 00000000000..940ed4c1ef2
--- /dev/null
+++
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dal/dialect/doris/type/DorisSwitchStatementAssert.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.DorisSwitchStatement;
+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.DorisSwitchStatementTestCase;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+/**
+ * Switch catalog statement assert for Doris.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class DorisSwitchStatementAssert {
+
+ /**
+ * Assert switch catalog statement is correct with expected parser result.
+ *
+ * @param assertContext assert context
+ * @param actual actual switch catalog statement
+ * @param expected expected switch catalog statement test case
+ */
+ public static void assertIs(final SQLCaseAssertContext assertContext,
final DorisSwitchStatement actual, final DorisSwitchStatementTestCase expected)
{
+ assertThat(assertContext.getText("Catalog name assertion error: "),
actual.getCatalogName(), is(expected.getCatalogName().getName()));
+ }
+}
diff --git
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/ddl/standard/type/CreateIndexStatementAssert.java
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/ddl/standard/type/CreateIndexStatementAssert.java
index 90329f22b40..d642c65ed39 100644
---
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/ddl/standard/type/CreateIndexStatementAssert.java
+++
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/ddl/standard/type/CreateIndexStatementAssert.java
@@ -19,11 +19,14 @@ package
org.apache.shardingsphere.test.it.sql.parser.internal.asserts.statement.
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
+import
org.apache.shardingsphere.sql.parser.statement.core.segment.ddl.property.PropertySegment;
import
org.apache.shardingsphere.sql.parser.statement.core.statement.type.ddl.index.CreateIndexStatement;
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.column.ColumnAssert;
import
org.apache.shardingsphere.test.it.sql.parser.internal.asserts.segment.index.IndexAssert;
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.segment.impl.distsql.ExpectedProperty;
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.standard.index.CreateIndexStatementTestCase;
import static org.hamcrest.CoreMatchers.is;
@@ -52,6 +55,42 @@ public final class CreateIndexStatementAssert {
assertColumns(assertContext, actual, expected);
assertLockTable(assertContext, actual, expected);
assertAlgorithm(assertContext, actual, expected);
+ assertIfNotExists(assertContext, actual, expected);
+ assertIndexType(assertContext, actual, expected);
+ assertProperties(assertContext, actual, expected);
+ }
+
+ private static void assertIfNotExists(final SQLCaseAssertContext
assertContext, final CreateIndexStatement actual, final
CreateIndexStatementTestCase expected) {
+ if (null != expected.getIfNotExists()) {
+ assertThat(assertContext.getText(String.format("`%s`'s if not
exists assertion error: ", actual.getClass().getSimpleName())),
+ actual.isIfNotExists(), is(expected.getIfNotExists()));
+ }
+ }
+
+ private static void assertIndexType(final SQLCaseAssertContext
assertContext, final CreateIndexStatement actual, final
CreateIndexStatementTestCase expected) {
+ if (null != expected.getIndexType()) {
+ assertNotNull(actual.getIndexType(), assertContext.getText("Index
type should not be null"));
+ assertThat(assertContext.getText("Index type assertion error: "),
+ actual.getIndexType(), is(expected.getIndexType()));
+ }
+ }
+
+ private static void assertProperties(final SQLCaseAssertContext
assertContext, final CreateIndexStatement actual, final
CreateIndexStatementTestCase expected) {
+ if (null != expected.getProperties()) {
+ assertNotNull(actual.getProperties(),
assertContext.getText("Properties should not be null"));
+ SQLSegmentAssert.assertIs(assertContext, actual.getProperties(),
expected.getProperties());
+ assertThat(assertContext.getText("Properties size assertion error:
"),
+ actual.getProperties().getProperties().size(),
is(expected.getProperties().getProperties().size()));
+ for (int i = 0; i <
expected.getProperties().getProperties().size(); i++) {
+ assertProperty(assertContext,
actual.getProperties().getProperties().get(i),
expected.getProperties().getProperties().get(i));
+ }
+ }
+ }
+
+ private static void assertProperty(final SQLCaseAssertContext
assertContext, final PropertySegment actual, final ExpectedProperty expected) {
+ assertThat(assertContext.getText(String.format("Property key '%s'
assertion error: ", expected.getKey())), actual.getKey(),
is(expected.getKey()));
+ assertThat(assertContext.getText(String.format("Property value for key
'%s' assertion error: ", expected.getKey())), actual.getValue(),
is(expected.getValue()));
+ SQLSegmentAssert.assertIs(assertContext, actual, expected);
}
private static void assertTable(final SQLCaseAssertContext assertContext,
final CreateIndexStatement actual, final CreateIndexStatementTestCase expected)
{
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 0a78408d5ff..a2f0816d557 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
@@ -23,6 +23,7 @@ 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.DorisAlterSystemStatementTestCase;
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dal.dialect.doris.DorisCreateSqlBlockRuleStatementTestCase;
+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.ddl.dialect.doris.DorisAlterStoragePolicyStatementTestCase;
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.dialect.doris.DorisResumeJobStatementTestCase;
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.standard.catalog.AlterCatalogStatementTestCase;
@@ -626,6 +627,9 @@ public final class RootSQLParserTestCases {
@XmlElement(name = "use")
private final List<MySQLUseStatementTestCase> useTestCases = new
LinkedList<>();
+ @XmlElement(name = "switch-catalog")
+ private final List<DorisSwitchStatementTestCase> switchCatalogTestCases =
new LinkedList<>();
+
@XmlElement(name = "explain")
private final List<ExplainStatementTestCase> explainTestCases = new
LinkedList<>();
diff --git
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/segment/impl/distsql/ExpectedProperties.java
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/segment/impl/distsql/ExpectedProperties.java
new file mode 100644
index 00000000000..dc5182df1e7
--- /dev/null
+++
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/segment/impl/distsql/ExpectedProperties.java
@@ -0,0 +1,40 @@
+/*
+ * 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.distsql;
+
+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.XmlElement;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * Expected properties segment.
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@Getter
+@Setter
+public final class ExpectedProperties extends AbstractExpectedSQLSegment {
+
+ @XmlElement(name = "property")
+ private final List<ExpectedProperty> properties = new LinkedList<>();
+}
diff --git
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/ddl/standard/index/CreateIndexStatementTestCase.java
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/dal/dialect/doris/DorisSwitchStatementTestCase.java
similarity index 50%
copy from
test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/ddl/standard/index/CreateIndexStatementTestCase.java
copy to
test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/dal/dialect/doris/DorisSwitchStatementTestCase.java
index 581578ee817..c962781328e 100644
---
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/ddl/standard/index/CreateIndexStatementTestCase.java
+++
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/dal/dialect/doris/DorisSwitchStatementTestCase.java
@@ -15,40 +15,22 @@
* limitations under the License.
*/
-package
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.ddl.standard.index;
+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.algorithm.ExpectedAlgorithmClause;
-import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.column.ExpectedColumn;
-import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.index.ExpectedIndex;
-import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.lock.ExpectedLockTypeClause;
-import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.table.ExpectedTable;
+import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.catalog.ExpectedCatalogName;
import javax.xml.bind.annotation.XmlElement;
-import java.util.LinkedList;
-import java.util.List;
/**
- * Create index statement test case.
+ * Switch catalog statement test case for Doris.
*/
@Getter
@Setter
-public final class CreateIndexStatementTestCase extends SQLParserTestCase {
+public final class DorisSwitchStatementTestCase extends SQLParserTestCase {
- @XmlElement
- private ExpectedIndex index;
-
- @XmlElement
- private ExpectedTable table;
-
- @XmlElement(name = "algorithm-option")
- private ExpectedAlgorithmClause algorithmOption;
-
- @XmlElement(name = "lock-option")
- private ExpectedLockTypeClause lockOption;
-
- @XmlElement(name = "column")
- private final List<ExpectedColumn> columns = new LinkedList<>();
+ @XmlElement(name = "catalog-name")
+ private ExpectedCatalogName catalogName;
}
diff --git
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/ddl/standard/index/CreateIndexStatementTestCase.java
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/ddl/standard/index/CreateIndexStatementTestCase.java
index 581578ee817..7aedc9f2aa0 100644
---
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/ddl/standard/index/CreateIndexStatementTestCase.java
+++
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/ddl/standard/index/CreateIndexStatementTestCase.java
@@ -22,10 +22,14 @@ 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.algorithm.ExpectedAlgorithmClause;
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.column.ExpectedColumn;
+import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.distsql.ExpectedProperties;
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.index.ExpectedIndex;
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.lock.ExpectedLockTypeClause;
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.table.ExpectedTable;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import java.util.LinkedList;
import java.util.List;
@@ -33,6 +37,7 @@ import java.util.List;
/**
* Create index statement test case.
*/
+@XmlAccessorType(XmlAccessType.FIELD)
@Getter
@Setter
public final class CreateIndexStatementTestCase extends SQLParserTestCase {
@@ -51,4 +56,13 @@ public final class CreateIndexStatementTestCase extends
SQLParserTestCase {
@XmlElement(name = "column")
private final List<ExpectedColumn> columns = new LinkedList<>();
+
+ @XmlAttribute(name = "if-not-exists")
+ private Boolean ifNotExists;
+
+ @XmlAttribute(name = "index-type")
+ private String indexType;
+
+ @XmlElement(name = "properties")
+ private ExpectedProperties properties;
}
diff --git a/test/it/parser/src/main/resources/case/dal/switch-catalog.xml
b/test/it/parser/src/main/resources/case/dal/switch-catalog.xml
new file mode 100644
index 00000000000..988104b1d14
--- /dev/null
+++ b/test/it/parser/src/main/resources/case/dal/switch-catalog.xml
@@ -0,0 +1,23 @@
+<?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>
+ <switch-catalog sql-case-id="switch_catalog">
+ <catalog-name name="hive" />
+ </switch-catalog>
+</sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/ddl/create-index.xml
b/test/it/parser/src/main/resources/case/ddl/create-index.xml
index fc8fc28d0b8..c813f88ba9f 100644
--- a/test/it/parser/src/main/resources/case/ddl/create-index.xml
+++ b/test/it/parser/src/main/resources/case/ddl/create-index.xml
@@ -403,4 +403,68 @@
</table>
<column start-index="54" stop-index="61" name="quantity" />
</create-index>
+
+ <create-index sql-case-id="create_index_doris_using_inverted"
index-type="INVERTED">
+ <index name="index1" start-index="13" stop-index="18" />
+ <table>
+ <simple-table name="table1" start-index="23" stop-index="28" />
+ </table>
+ <column start-index="31" stop-index="37" name="column1" />
+ </create-index>
+
+ <create-index sql-case-id="create_index_doris_using_ngram_bf"
index-type="NGRAM_BF">
+ <index name="index1" start-index="13" stop-index="18" />
+ <table>
+ <simple-table name="table1" start-index="23" stop-index="28" />
+ </table>
+ <column start-index="31" stop-index="37" name="column1" />
+ </create-index>
+
+ <create-index sql-case-id="create_index_doris_using_ann" index-type="ANN">
+ <index name="index1" start-index="13" stop-index="18" />
+ <table>
+ <simple-table name="table1" start-index="23" stop-index="28" />
+ </table>
+ <column start-index="31" stop-index="37" name="column1" />
+ </create-index>
+
+ <create-index sql-case-id="create_index_doris_if_not_exists"
if-not-exists="true" index-type="INVERTED">
+ <index name="index1" start-index="27" stop-index="32" />
+ <table>
+ <simple-table name="table1" start-index="37" stop-index="42" />
+ </table>
+ <column start-index="45" stop-index="51" name="column1" />
+ </create-index>
+
+ <create-index sql-case-id="create_index_doris_with_properties"
index-type="INVERTED">
+ <index name="index1" start-index="13" stop-index="18" />
+ <table>
+ <simple-table name="table1" start-index="23" stop-index="28" />
+ </table>
+ <column start-index="31" stop-index="37" name="column1" />
+ <properties start-index="55" stop-index="88">
+ <property key="parser" value="standard" start-index="67"
stop-index="87" />
+ </properties>
+ </create-index>
+
+ <create-index sql-case-id="create_index_doris_with_comment"
index-type="INVERTED">
+ <index name="index1" start-index="13" stop-index="18" />
+ <table>
+ <simple-table name="table1" start-index="23" stop-index="28" />
+ </table>
+ <column start-index="31" stop-index="37" name="column1" />
+ <comment text="inverted index" start-index="64" stop-index="79" />
+ </create-index>
+
+ <create-index sql-case-id="create_index_doris_full_syntax"
if-not-exists="true" index-type="INVERTED">
+ <index name="index1" start-index="27" stop-index="32" />
+ <table>
+ <simple-table name="table1" start-index="37" stop-index="42" />
+ </table>
+ <column start-index="45" stop-index="51" name="column1" />
+ <properties start-index="69" stop-index="102">
+ <property key="parser" value="standard" start-index="81"
stop-index="101" />
+ </properties>
+ <comment text="full syntax" start-index="115" stop-index="127" />
+ </create-index>
</sql-parser-test-cases>
diff --git
a/test/it/parser/src/main/resources/sql/supported/dal/switch-catalog.xml
b/test/it/parser/src/main/resources/sql/supported/dal/switch-catalog.xml
new file mode 100644
index 00000000000..58dc4e6de11
--- /dev/null
+++ b/test/it/parser/src/main/resources/sql/supported/dal/switch-catalog.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="switch_catalog" value="SWITCH hive;" db-types="Doris" />
+</sql-cases>
diff --git
a/test/it/parser/src/main/resources/sql/supported/ddl/create-index.xml
b/test/it/parser/src/main/resources/sql/supported/ddl/create-index.xml
index 998053558b3..f1610fa1c78 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/create-index.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/create-index.xml
@@ -92,4 +92,11 @@
<sql-case id="create_index_full_options_with_stored_by" value="CREATE
INDEX idx_products_full ON TABLE products (product_id, category, price) AS
'org.apache.hadoop.hive.ql.index.compact.CompactIndexHandler' WITH DEFERRED
REBUILD IDXPROPERTIES ('index_type' = 'secondary') IN TABLE idx_products_data
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH
SERDEPROPERTIES ('hbase.table.name' = 'products:index') LOCATION
'/user/hive/indexes/products_full_idx' TBLPROPERTIES ('hba [...]
<sql-case id="create_index_with_deferred_rebuild_and_in_table"
value="CREATE INDEX idx_order_customer ON TABLE orders (customer_id) AS
'org.apache.hadoop.hive.ql.index.compact.CompactIndexHandler' WITH DEFERRED
REBUILD IN TABLE idx_orders_customer" db-types="Hive" />
<sql-case id="create_index_with_location_tblproperties_comment"
value="CREATE INDEX idx_product_quantity ON TABLE inventory (quantity) AS
'org.apache.hadoop.hive.ql.index.compact.CompactIndexHandler' LOCATION
'/user/hive/indexes/inventory_quantity_idx' TBLPROPERTIES ('storage_policy' =
'hot', 'compression' = 'lzo') COMMENT 'Index on inventory quantity for stock
level queries'" db-types="Hive" />
+ <sql-case id="create_index_doris_using_inverted" value="CREATE INDEX
index1 ON table1 (column1) USING INVERTED" db-types="Doris" />
+ <sql-case id="create_index_doris_using_ngram_bf" value="CREATE INDEX
index1 ON table1 (column1) USING NGRAM_BF" db-types="Doris" />
+ <sql-case id="create_index_doris_using_ann" value="CREATE INDEX index1 ON
table1 (column1) USING ANN" db-types="Doris" />
+ <sql-case id="create_index_doris_if_not_exists" value="CREATE INDEX IF NOT
EXISTS index1 ON table1 (column1) USING INVERTED" db-types="Doris" />
+ <sql-case id="create_index_doris_with_properties" value="CREATE INDEX
index1 ON table1 (column1) USING INVERTED PROPERTIES ('parser' = 'standard')"
db-types="Doris" />
+ <sql-case id="create_index_doris_with_comment" value="CREATE INDEX index1
ON table1 (column1) USING INVERTED COMMENT 'inverted index'" db-types="Doris" />
+ <sql-case id="create_index_doris_full_syntax" value="CREATE INDEX IF NOT
EXISTS index1 ON table1 (column1) USING INVERTED PROPERTIES ('parser' =
'standard') COMMENT 'full syntax'" db-types="Doris" />
</sql-cases>