diff --git a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/ddl/impl/AlterTablespaceStatementAssert.java b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/ddl/impl/AlterTablespaceStatementAssert.java index 6c25750a67f59..9fd1875cf9bbe 100644 --- a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/ddl/impl/AlterTablespaceStatementAssert.java +++ b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/ddl/impl/AlterTablespaceStatementAssert.java @@ -42,12 +42,8 @@ public final class AlterTablespaceStatementAssert { * @param expected expected alter tablespace statement test case */ public static void assertIs(final SQLCaseAssertContext assertContext, final AlterTablespaceStatement actual, final AlterTablespaceStatementTestCase expected) { - if (null != expected.getTablespace()) { - assertTablespace(assertContext, actual, expected); - } - if (null != expected.getRenameTablespace()) { - assertRenameTablespace(assertContext, actual, expected); - } + assertTablespace(assertContext, actual, expected); + assertRenameTablespace(assertContext, actual, expected); } private static void assertTablespace(final SQLCaseAssertContext assertContext, final AlterTablespaceStatement actual, final AlterTablespaceStatementTestCase expected) { @@ -56,8 +52,8 @@ private static void assertTablespace(final SQLCaseAssertContext assertContext, f } else { assertNotNull(actual.getTablespaceSegment(), assertContext.getText("Actual tablespace should exist.")); IdentifierValueAssert.assertIs(assertContext, actual.getTablespaceSegment().getIdentifier(), expected.getTablespace(), "Tablespace"); + SQLSegmentAssert.assertIs(assertContext, actual.getTablespaceSegment(), expected.getTablespace()); } - SQLSegmentAssert.assertIs(assertContext, actual.getTablespaceSegment(), expected.getTablespace()); } private static void assertRenameTablespace(final SQLCaseAssertContext assertContext, final AlterTablespaceStatement actual, final AlterTablespaceStatementTestCase expected) { @@ -66,7 +62,7 @@ private static void assertRenameTablespace(final SQLCaseAssertContext assertCont } else { assertNotNull(actual.getRenameTablespaceSegment(), assertContext.getText("Actual rename tablespace should exist.")); IdentifierValueAssert.assertIs(assertContext, actual.getRenameTablespaceSegment().getIdentifier(), expected.getRenameTablespace(), "Tablespace"); + SQLSegmentAssert.assertIs(assertContext, actual.getRenameTablespaceSegment(), expected.getRenameTablespace()); } - SQLSegmentAssert.assertIs(assertContext, actual.getRenameTablespaceSegment(), expected.getRenameTablespace()); } } diff --git a/test/it/parser/src/main/resources/case/ddl/alter-table.xml b/test/it/parser/src/main/resources/case/ddl/alter-table.xml index 28281c1eb8493..c230ad9aec0a2 100644 --- a/test/it/parser/src/main/resources/case/ddl/alter-table.xml +++ b/test/it/parser/src/main/resources/case/ddl/alter-table.xml @@ -1744,11 +1744,21 @@ - +
+ +
+ + + + +
+ + +
@@ -1765,4 +1775,13 @@ + + +
+ + + + + + diff --git a/test/it/parser/src/main/resources/case/ddl/alter-tablespace.xml b/test/it/parser/src/main/resources/case/ddl/alter-tablespace.xml index da1fff20a0c9d..0f821a3fd69d4 100644 --- a/test/it/parser/src/main/resources/case/ddl/alter-tablespace.xml +++ b/test/it/parser/src/main/resources/case/ddl/alter-tablespace.xml @@ -21,32 +21,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/it/parser/src/main/resources/case/dml/select-group-by.xml b/test/it/parser/src/main/resources/case/dml/select-group-by.xml index 087d9c33aef71..93e2ca7ff2fca 100644 --- a/test/it/parser/src/main/resources/case/dml/select-group-by.xml +++ b/test/it/parser/src/main/resources/case/dml/select-group-by.xml @@ -32,7 +32,48 @@ - + + +