This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang 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 96f4bedf0ab support REASSIGN OWNED statement and REFRESH MATERIALIZED
VIEW statement in PostgreSQL (#18846)
96f4bedf0ab is described below
commit 96f4bedf0ab74dceff1454eae33a40b974f6fbac
Author: RunQi Zhao <[email protected]>
AuthorDate: Tue Jul 5 14:39:49 2022 +0800
support REASSIGN OWNED statement and REFRESH MATERIALIZED VIEW statement in
PostgreSQL (#18846)
* support REASSIGN OWNED statement and REFRESH MATERIALIZED VIEW statement
* fix ci
---
.../main/antlr4/imports/postgresql/DCLStatement.g4 | 8 ++---
.../main/antlr4/imports/postgresql/DDLStatement.g4 | 8 ++---
.../parser/autogen/PostgreSQLStatementParser.g4 | 2 ++
.../impl/PostgreSQLDCLStatementSQLVisitor.java | 7 ++++
.../impl/PostgreSQLDDLStatementSQLVisitor.java | 7 ++++
.../core/database/visitor/SQLVisitorRule.java | 4 +++
.../statement/dcl/ReassignOwnedStatement.java | 26 ++++++++++++++
.../statement/ddl/RefreshMatViewStmtStatement.java | 28 +++++++++++++++
.../dcl/PostgreSQLReassignOwnedStatement.java | 29 +++++++++++++++
.../ddl/PostgreSQLRefreshMatViewStmtStatement.java | 29 +++++++++++++++
.../asserts/statement/dcl/DCLStatementAssert.java | 5 +++
.../dcl/impl/ReassignOwnedStatementAssert.java | 41 ++++++++++++++++++++++
.../asserts/statement/ddl/DDLStatementAssert.java | 5 +++
.../impl/RefreshMatViewStmtStatementAssert.java | 41 ++++++++++++++++++++++
.../jaxb/cases/domain/SQLParserTestCases.java | 10 ++++++
.../dcl/ReassignOwnedStatementTestCase.java | 26 ++++++++++++++
.../ddl/RefreshMatViewStmtStatementTestCase.java | 26 ++++++++++++++
.../src/main/resources/case/dcl/reassign-owned.xml | 21 +++++++++++
.../case/ddl/refresh-materialized-view.xml | 24 +++++++++++++
.../resources/sql/supported/dcl/reassign-owned.xml | 21 +++++++++++
.../supported/ddl/refresh-materialized-view.xml | 24 +++++++++++++
.../main/resources/sql/unsupported/unsupported.xml | 30 ----------------
22 files changed, 384 insertions(+), 38 deletions(-)
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/DCLStatement.g4
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/DCLStatement.g4
index a7cfea5aabc..de01dca2e95 100644
---
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/DCLStatement.g4
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/DCLStatement.g4
@@ -93,10 +93,10 @@ createGroup
: CREATE GROUP roleSpec WITH? createOptRoleElem*
;
-dropDroup
- : DROP GROUP ifExists? roleList
- ;
-
reassignOwned
: REASSIGN OWNED BY roleList TO roleSpec
;
+
+dropDroup
+ : DROP GROUP ifExists? roleList
+ ;
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/DDLStatement.g4
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/DDLStatement.g4
index f7e45cd71f6..ccc34a93684 100644
---
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/DDLStatement.g4
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/DDLStatement.g4
@@ -976,10 +976,6 @@ createMvTarget
: qualifiedName optColumnList? tableAccessMethodClause (WITH reloptions)?
(TABLESPACE name)?
;
-refreshMatViewStmt
- : REFRESH MATERIALIZED VIEW CONCURRENTLY? qualifiedName (WITH DATA | WITH
NO DATA)?
- ;
-
alterPolicy
: ALTER POLICY name ON tableName alterPolicyClauses
;
@@ -989,6 +985,10 @@ alterPolicyClauses
| RENAME TO name
;
+refreshMatViewStmt
+ : REFRESH MATERIALIZED VIEW CONCURRENTLY? qualifiedName (WITH DATA | WITH
NO DATA)?
+ ;
+
alterProcedure
: ALTER PROCEDURE functionWithArgtypes alterProcedureClauses
;
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/PostgreSQLStatementParser.g4
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/PostgreSQLStatementParser.g4
index d97e1491295..cefbbc46325 100644
---
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/PostgreSQLStatementParser.g4
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/PostgreSQLStatementParser.g4
@@ -163,5 +163,7 @@ execute
| alterRule
| createCollation
| prepareTransaction
+ | reassignOwned
+ | refreshMatViewStmt
) SEMI_? EOF
;
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLDCLStatementSQLVisitor.java
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLDCLStatementSQLVisitor.java
index ae118197ef1..4c5f3d53d49 100644
---
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLDCLStatementSQLVisitor.java
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLDCLStatementSQLVisitor.java
@@ -30,6 +30,7 @@ import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.Dr
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.GrantContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.PrivilegeClauseContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.RevokeContext;
+import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.ReassignOwnedContext;
import
org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment;
import
org.apache.shardingsphere.sql.parser.sql.common.value.collection.CollectionValue;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.dcl.PostgreSQLAlterRoleStatement;
@@ -39,6 +40,7 @@ import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.dcl
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.dcl.PostgreSQLDropRoleStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.dcl.PostgreSQLDropUserStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.dcl.PostgreSQLGrantStatement;
+import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.dcl.PostgreSQLReassignOwnedStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.dcl.PostgreSQLRevokeStatement;
import java.util.Collection;
@@ -110,4 +112,9 @@ public final class PostgreSQLDCLStatementSQLVisitor extends
PostgreSQLStatementS
public ASTNode visitDropRole(final DropRoleContext ctx) {
return new PostgreSQLDropRoleStatement();
}
+
+ @Override
+ public ASTNode visitReassignOwned(final ReassignOwnedContext ctx) {
+ return new PostgreSQLReassignOwnedStatement();
+ }
}
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLDDLStatementSQLVisitor.java
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLDDLStatementSQLVisitor.java
index 4858a9b00f9..6cc76f904ca 100644
---
a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLDDLStatementSQLVisitor.java
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLDDLStatementSQLVisitor.java
@@ -158,6 +158,7 @@ import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.Ta
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.TruncateTableContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.UnlistenContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.ValidateConstraintSpecificationContext;
+import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.RefreshMatViewStmtContext;
import org.apache.shardingsphere.sql.parser.sql.common.constant.DirectionType;
import
org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.AlterDefinitionSegment;
import
org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.CreateDefinitionSegment;
@@ -282,6 +283,7 @@ import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLMoveStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLNotifyStmtStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLPrepareStatement;
+import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLRefreshMatViewStmtStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLTruncateStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLUnlistenStatement;
@@ -1288,4 +1290,9 @@ public final class PostgreSQLDDLStatementSQLVisitor
extends PostgreSQLStatementS
public ASTNode visitCreateCollation(final CreateCollationContext ctx) {
return new PostgreSQLCreateCollationStatement();
}
+
+ @Override
+ public ASTNode visitRefreshMatViewStmt(final RefreshMatViewStmtContext
ctx) {
+ return new PostgreSQLRefreshMatViewStmtStatement();
+ }
}
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java
b/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java
index caedb134202..3216cf38b2b 100644
---
a/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java
@@ -248,6 +248,8 @@ public enum SQLVisitorRule {
NOTIFY("NotifyStmt", SQLStatementType.DDL),
+ REFRESH_MATERIALIZED_VIEW("RefreshMatViewStmt", SQLStatementType.DDL),
+
UNLISTEN("Unlisten", SQLStatementType.DDL),
SET_CONSTRAINTS("SetConstraints", SQLStatementType.TCL),
@@ -592,6 +594,8 @@ public enum SQLVisitorRule {
PREPARE_TRANSACTION("PrepareTransaction", SQLStatementType.TCL),
+ REASSIGN_OWNED("ReassignOwned", SQLStatementType.DCL),
+
CREATE_COLLATION("CreateCollation", SQLStatementType.DDL);
private final String name;
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/statement/dcl/ReassignOwnedStatement.java
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/statement/dcl/ReassignOwnedStatement.java
new file mode 100644
index 00000000000..29cd2837a76
--- /dev/null
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/statement/dcl/ReassignOwnedStatement.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.sql.parser.sql.common.statement.dcl;
+
+import
org.apache.shardingsphere.sql.parser.sql.common.statement.AbstractSQLStatement;
+
+/**
+ * Reassign owned statement.
+ */
+public abstract class ReassignOwnedStatement extends AbstractSQLStatement
implements DCLStatement {
+}
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/statement/ddl/RefreshMatViewStmtStatement.java
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/statement/ddl/RefreshMatViewStmtStatement.java
new file mode 100644
index 00000000000..7721b7556cd
--- /dev/null
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/statement/ddl/RefreshMatViewStmtStatement.java
@@ -0,0 +1,28 @@
+/*
+ * 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.sql.common.statement.ddl;
+
+import lombok.ToString;
+import
org.apache.shardingsphere.sql.parser.sql.common.statement.AbstractSQLStatement;
+
+/**
+ * Refresh materialized view statement.
+ */
+@ToString
+public abstract class RefreshMatViewStmtStatement extends AbstractSQLStatement
implements DDLStatement {
+}
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/postgresql/dcl/PostgreSQLReassignOwnedStatement.java
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/postgresql/dcl/PostgreSQLReassignOwnedStatement.java
new file mode 100644
index 00000000000..2804c8378b5
--- /dev/null
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/postgresql/dcl/PostgreSQLReassignOwnedStatement.java
@@ -0,0 +1,29 @@
+/*
+ * 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.sql.dialect.statement.postgresql.dcl;
+
+import lombok.ToString;
+import
org.apache.shardingsphere.sql.parser.sql.common.statement.dcl.ReassignOwnedStatement;
+import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.PostgreSQLStatement;
+
+/**
+ * PostgreSQL reassign owned statement.
+ */
+@ToString
+public final class PostgreSQLReassignOwnedStatement extends
ReassignOwnedStatement implements PostgreSQLStatement {
+}
diff --git
a/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/postgresql/ddl/PostgreSQLRefreshMatViewStmtStatement.java
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/postgresql/ddl/PostgreSQLRefreshMatViewStmtStatement.java
new file mode 100644
index 00000000000..20e5ec61099
--- /dev/null
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/postgresql/ddl/PostgreSQLRefreshMatViewStmtStatement.java
@@ -0,0 +1,29 @@
+/*
+ * 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.sql.dialect.statement.postgresql.ddl;
+
+import lombok.ToString;
+import
org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.RefreshMatViewStmtStatement;
+import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.PostgreSQLStatement;
+
+/**
+ * PostgreSQL refresh materialized view statement.
+ */
+@ToString
+public final class PostgreSQLRefreshMatViewStmtStatement extends
RefreshMatViewStmtStatement implements PostgreSQLStatement {
+}
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dcl/DCLStatementAssert.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dcl/DCLStatementAssert.java
index f8ff44f4582..faf2d11e905 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dcl/DCLStatementAssert.java
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dcl/DCLStatementAssert.java
@@ -27,6 +27,7 @@ import
org.apache.shardingsphere.sql.parser.sql.common.statement.dcl.DCLStatemen
import
org.apache.shardingsphere.sql.parser.sql.common.statement.dcl.DropRoleStatement;
import
org.apache.shardingsphere.sql.parser.sql.common.statement.dcl.DropUserStatement;
import
org.apache.shardingsphere.sql.parser.sql.common.statement.dcl.GrantStatement;
+import
org.apache.shardingsphere.sql.parser.sql.common.statement.dcl.ReassignOwnedStatement;
import
org.apache.shardingsphere.sql.parser.sql.common.statement.dcl.RevokeStatement;
import
org.apache.shardingsphere.sql.parser.sql.common.statement.dcl.SetRoleStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dcl.MySQLRenameUserStatement;
@@ -49,6 +50,7 @@ import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.dcl.impl.DropRoleStatementAssert;
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.dcl.impl.DropUserStatementAssert;
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.dcl.impl.GrantStatementAssert;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.dcl.impl.ReassignOwnedStatementAssert;
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.dcl.impl.RenameUserStatementAssert;
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.dcl.impl.RevokeStatementAssert;
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.dcl.impl.SetDefaultRoleStatementAssert;
@@ -67,6 +69,7 @@ import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.dcl.DropRoleStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.dcl.DropUserStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.dcl.GrantStatementTestCase;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.dcl.ReassignOwnedStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.dcl.RenameUserStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.dcl.RevokeStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.dcl.SetDefaultRoleStatementTestCase;
@@ -122,6 +125,8 @@ public final class DCLStatementAssert {
SetPasswordStatementAssert.assertIs(assertContext,
(MySQLSetPasswordStatement) actual, (SetPasswordStatementTestCase) expected);
} else if (actual instanceof SQLServerSetUserStatement) {
SQLServerSetUserStatementAssert.assertIs(assertContext,
(SQLServerSetUserStatement) actual, (SetUserStatementTestCase) expected);
+ } else if (actual instanceof ReassignOwnedStatement) {
+ ReassignOwnedStatementAssert.assertIs(assertContext,
(ReassignOwnedStatement) actual, (ReassignOwnedStatementTestCase) expected);
}
}
}
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dcl/impl/ReassignOwnedStatementAssert.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dcl/impl/ReassignOwnedStatementAssert.java
new file mode 100644
index 00000000000..1f20c227320
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/dcl/impl/ReassignOwnedStatementAssert.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.sql.parser.parameterized.asserts.statement.dcl.impl;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+import
org.apache.shardingsphere.sql.parser.sql.common.statement.dcl.ReassignOwnedStatement;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.SQLCaseAssertContext;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.dcl.ReassignOwnedStatementTestCase;
+
+/**
+ * Reassign owned statement assert.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class ReassignOwnedStatementAssert {
+
+ /**
+ * Assert reassign owned statement is correct with expected parser result.
+ *
+ * @param assertContext assert context
+ * @param actual actual reassign owned statement
+ * @param expected expected reassign owned statement test case
+ */
+ public static void assertIs(final SQLCaseAssertContext assertContext,
final ReassignOwnedStatement actual, final ReassignOwnedStatementTestCase
expected) {
+ }
+}
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/ddl/DDLStatementAssert.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/ddl/DDLStatementAssert.java
index c845d7ab655..cd29b20f1b1 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/ddl/DDLStatementAssert.java
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/ddl/DDLStatementAssert.java
@@ -35,6 +35,7 @@ import
org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.FetchStatem
import
org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.ListenStatement;
import
org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.MoveStatement;
import
org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.NotifyStmtStatement;
+import
org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.RefreshMatViewStmtStatement;
import
org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.RenameTableStatement;
import
org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.TruncateStatement;
import
org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.UnlistenStatement;
@@ -69,6 +70,7 @@ import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.ddl.impl.MoveStatementAssert;
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.ddl.impl.NoAuditStatementAssert;
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.ddl.impl.NotifyStmtStatementAssert;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.ddl.impl.RefreshMatViewStmtStatementAssert;
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.ddl.impl.RenameTableStatementAssert;
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.ddl.impl.TruncateStatementAssert;
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.ddl.impl.ListenStatementAssert;
@@ -96,6 +98,7 @@ import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.MoveStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.NoAuditStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.NotifyStmtStatementTestCase;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.RefreshMatViewStmtStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.RenameTableStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.TruncateStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.ListenStatementTestCase;
@@ -167,6 +170,8 @@ public final class DDLStatementAssert {
UnlistenStatementAssert.assertIs(assertContext,
(UnlistenStatement) actual, (UnlistenStatementTestCase) expected);
} else if (actual instanceof NotifyStmtStatement) {
NotifyStmtStatementAssert.assertIs(assertContext,
(NotifyStmtStatement) actual, (NotifyStmtStatementTestCase) expected);
+ } else if (actual instanceof RefreshMatViewStmtStatement) {
+ RefreshMatViewStmtStatementAssert.assertIs(assertContext,
(RefreshMatViewStmtStatement) actual, (RefreshMatViewStmtStatementTestCase)
expected);
}
}
}
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/ddl/impl/RefreshMatViewStmtStatementAssert.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/ddl/impl/RefreshMatViewStmtStatementAssert.java
new file mode 100644
index 00000000000..5a784bb691f
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/ddl/impl/RefreshMatViewStmtStatementAssert.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.sql.parser.parameterized.asserts.statement.ddl.impl;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+import
org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.RefreshMatViewStmtStatement;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.SQLCaseAssertContext;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.RefreshMatViewStmtStatementTestCase;
+
+/**
+ * Refresh materialized view statement assert.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class RefreshMatViewStmtStatementAssert {
+
+ /**
+ * Assert refresh materialized view statement is correct with expected
parser result.
+ *
+ * @param assertContext assert context
+ * @param actual actual refresh materialized view statement
+ * @param expected expected refresh materialized view statement test case
+ */
+ public static void assertIs(final SQLCaseAssertContext assertContext,
final RefreshMatViewStmtStatement actual, final
RefreshMatViewStmtStatementTestCase expected) {
+ }
+}
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
index 285665618f4..d2d1f01ec5b 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
@@ -83,6 +83,7 @@ import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.dcl.DropRoleStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.dcl.DropUserStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.dcl.GrantStatementTestCase;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.dcl.ReassignOwnedStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.dcl.RenameUserStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.dcl.RevertStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.dcl.RevokeStatementTestCase;
@@ -240,6 +241,7 @@ import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.NotifyStmtStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.PreparedStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.PurgeStatementTestCase;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.RefreshMatViewStmtStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.RenameStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.RenameTableStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.TruncateStatementTestCase;
@@ -1343,6 +1345,9 @@ public final class SQLParserTestCases {
@XmlElement(name = "notify")
private final List<NotifyStmtStatementTestCase> notifyTestCases = new
LinkedList<>();
+ @XmlElement(name = "refresh-materialized-view")
+ private final List<RefreshMatViewStmtStatementTestCase>
refreshMatViewStmtStatementTestCases = new LinkedList<>();
+
@XmlElement(name = "unlisten")
private final List<UnlistenStatementTestCase> unlistenTestCases = new
LinkedList<>();
@@ -1508,6 +1513,9 @@ public final class SQLParserTestCases {
@XmlElement(name = "prepare-transaction")
private final List<PrepareTransactionTestCase> prepareTransactionTestCases
= new LinkedList<>();
+ @XmlElement(name = "reassign-owned")
+ private final List<ReassignOwnedStatementTestCase>
reassignOwnedStatementTestCases = new LinkedList<>();
+
/**
* Get all SQL parser test cases.
*
@@ -1865,6 +1873,7 @@ public final class SQLParserTestCases {
putAll(dropRollbackSegmentTestCases, result);
putAll(listenTestCases, result);
putAll(notifyTestCases, result);
+ putAll(refreshMatViewStmtStatementTestCases, result);
putAll(unlistenTestCases, result);
putAll(createLockdownProfileTestCases, result);
putAll(dropLockdownProfileTestCases, result);
@@ -1884,6 +1893,7 @@ public final class SQLParserTestCases {
putAll(createAccessMethodTestCases, result);
putAll(createCollationStatementTestCases, result);
putAll(prepareTransactionTestCases, result);
+ putAll(reassignOwnedStatementTestCases, result);
return result;
}
// CHECKSTYLE:ON
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/dcl/ReassignOwnedStatementTestCase.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/dcl/ReassignOwnedStatementTestCase.java
new file mode 100644
index 00000000000..81ee81d1bce
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/dcl/ReassignOwnedStatementTestCase.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.dcl;
+
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.SQLParserTestCase;
+
+/**
+ * Reassign owned statement test case.
+ */
+public final class ReassignOwnedStatementTestCase extends SQLParserTestCase {
+}
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/RefreshMatViewStmtStatementTestCase.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/RefreshMatViewStmtStatementTestCase.java
new file mode 100644
index 00000000000..e7423c02c0f
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/RefreshMatViewStmtStatementTestCase.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl;
+
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.SQLParserTestCase;
+
+/**
+ * Refresh materialized view test case.
+ */
+public final class RefreshMatViewStmtStatementTestCase extends
SQLParserTestCase {
+}
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dcl/reassign-owned.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dcl/reassign-owned.xml
new file mode 100644
index 00000000000..3a60acfedce
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dcl/reassign-owned.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<sql-parser-test-cases>
+ <reassign-owned sql-case-id="reassign_owned" />
+</sql-parser-test-cases>
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/ddl/refresh-materialized-view.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/ddl/refresh-materialized-view.xml
new file mode 100644
index 00000000000..3a95f8b0574
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/ddl/refresh-materialized-view.xml
@@ -0,0 +1,24 @@
+<?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>
+ <refresh-materialized-view sql-case-id="refresh_mat_view_concurrently" />
+ <refresh-materialized-view
sql-case-id="refresh_mat_view_concurrently_no_data" />
+ <refresh-materialized-view sql-case-id="refresh_mat_view_point" />
+ <refresh-materialized-view sql-case-id="refresh_mat_view" />
+</sql-parser-test-cases>
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/dcl/reassign-owned.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/dcl/reassign-owned.xml
new file mode 100644
index 00000000000..ee4f0ec8cd9
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/dcl/reassign-owned.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="reassign_owned" value="REASSIGN OWNED BY regress_dep_user0
TO regress_dep_user1;" db-types="PostgreSQL" />
+</sql-cases>
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/ddl/refresh-materialized-view.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/ddl/refresh-materialized-view.xml
new file mode 100644
index 00000000000..97578752d50
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/ddl/refresh-materialized-view.xml
@@ -0,0 +1,24 @@
+<?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="refresh_mat_view_concurrently" value="REFRESH MATERIALIZED
VIEW CONCURRENTLY mvtest_boxmv;" db-types="PostgreSQL" />
+ <sql-case id="refresh_mat_view_concurrently_no_data" value="REFRESH
MATERIALIZED VIEW CONCURRENTLY mvtest_tvmm WITH NO DATA;" db-types="PostgreSQL"
/>
+ <sql-case id="refresh_mat_view_point" value="REFRESH MATERIALIZED VIEW
matview_schema.mv_nodata2;" db-types="PostgreSQL" />
+ <sql-case id="refresh_mat_view" value="REFRESH MATERIALIZED VIEW
mvtest_mv;" db-types="PostgreSQL" />
+</sql-cases>
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/unsupported/unsupported.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/unsupported/unsupported.xml
index 3aef72092cf..2cc8d31cf21 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/unsupported/unsupported.xml
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/unsupported/unsupported.xml
@@ -4627,33 +4627,6 @@
<sql-case id="insert_by_postgresql_source_test_case395" value="INSERT INTO
truncate_b DEFAULT VALUES;" db-types="PostgreSQL" />
<sql-case id="insert_by_postgresql_source_test_case396" value="INSERT INTO
truncate_b DEFAULT VALUES;" db-types="PostgreSQL" />
<sql-case id="insert_by_postgresql_source_test_case428" value="INSERT INTO
y2 (SELECT x, md5(x::text) FROM generate_series(0,20) x);"
db-types="PostgreSQL" />
- <sql-case id="reassign_by_postgresql_source_test_case1" value="REASSIGN
OWNED BY regress_dep_user0 TO regress_dep_user1;" db-types="PostgreSQL" />
- <sql-case id="reassign_by_postgresql_source_test_case2" value="REASSIGN
OWNED BY regress_dep_user1 TO regress_dep_user0;" db-types="PostgreSQL" />
- <sql-case id="reassign_by_postgresql_source_test_case3" value="REASSIGN
OWNED BY regress_dep_user1 TO regress_dep_user2;" db-types="PostgreSQL" />
- <sql-case id="reassign_by_postgresql_source_test_case4" value="REASSIGN
OWNED BY regress_test_role TO regress_test_role2;" db-types="PostgreSQL" />
- <sql-case id="refresh_by_postgresql_source_test_case1" value="REFRESH
MATERIALIZED VIEW CONCURRENTLY mvtest_boxmv;" db-types="PostgreSQL" />
- <sql-case id="refresh_by_postgresql_source_test_case2" value="REFRESH
MATERIALIZED VIEW CONCURRENTLY mvtest_mv;" db-types="PostgreSQL" />
- <sql-case id="refresh_by_postgresql_source_test_case3" value="REFRESH
MATERIALIZED VIEW CONCURRENTLY mvtest_mv;" db-types="PostgreSQL" />
- <sql-case id="refresh_by_postgresql_source_test_case4" value="REFRESH
MATERIALIZED VIEW CONCURRENTLY mvtest_mv_foo;" db-types="PostgreSQL" />
- <sql-case id="refresh_by_postgresql_source_test_case5" value="REFRESH
MATERIALIZED VIEW CONCURRENTLY mvtest_mv_v;" db-types="PostgreSQL" />
- <sql-case id="refresh_by_postgresql_source_test_case6" value="REFRESH
MATERIALIZED VIEW CONCURRENTLY mvtest_tm;" db-types="PostgreSQL" />
- <sql-case id="refresh_by_postgresql_source_test_case7" value="REFRESH
MATERIALIZED VIEW CONCURRENTLY mvtest_tvmm WITH NO DATA;" db-types="PostgreSQL"
/>
- <sql-case id="refresh_by_postgresql_source_test_case8" value="REFRESH
MATERIALIZED VIEW CONCURRENTLY mvtest_tvmm;" db-types="PostgreSQL" />
- <sql-case id="refresh_by_postgresql_source_test_case9" value="REFRESH
MATERIALIZED VIEW matview_schema.mv_nodata2;" db-types="PostgreSQL" />
- <sql-case id="refresh_by_postgresql_source_test_case10" value="REFRESH
MATERIALIZED VIEW matview_schema.mv_withdata2;" db-types="PostgreSQL" />
- <sql-case id="refresh_by_postgresql_source_test_case11" value="REFRESH
MATERIALIZED VIEW mvtest_mv;" db-types="PostgreSQL" />
- <sql-case id="refresh_by_postgresql_source_test_case12" value="REFRESH
MATERIALIZED VIEW mvtest_mv;" db-types="PostgreSQL" />
- <sql-case id="refresh_by_postgresql_source_test_case13" value="REFRESH
MATERIALIZED VIEW mvtest_mv_foo;" db-types="PostgreSQL" />
- <sql-case id="refresh_by_postgresql_source_test_case14" value="REFRESH
MATERIALIZED VIEW mvtest_mv_v;" db-types="PostgreSQL" />
- <sql-case id="refresh_by_postgresql_source_test_case15" value="REFRESH
MATERIALIZED VIEW mvtest_mv_v_2;" db-types="PostgreSQL" />
- <sql-case id="refresh_by_postgresql_source_test_case16" value="REFRESH
MATERIALIZED VIEW mvtest_mv_v_3;" db-types="PostgreSQL" />
- <sql-case id="refresh_by_postgresql_source_test_case17" value="REFRESH
MATERIALIZED VIEW mvtest_mv_v_4;" db-types="PostgreSQL" />
- <sql-case id="refresh_by_postgresql_source_test_case18" value="REFRESH
MATERIALIZED VIEW mvtest_tm;" db-types="PostgreSQL" />
- <sql-case id="refresh_by_postgresql_source_test_case19" value="REFRESH
MATERIALIZED VIEW mvtest_tmm;" db-types="PostgreSQL" />
- <sql-case id="refresh_by_postgresql_source_test_case20" value="REFRESH
MATERIALIZED VIEW mvtest_tvm;" db-types="PostgreSQL" />
- <sql-case id="refresh_by_postgresql_source_test_case21" value="REFRESH
MATERIALIZED VIEW mvtest_tvmm;" db-types="PostgreSQL" />
- <sql-case id="refresh_by_postgresql_source_test_case22" value="REFRESH
MATERIALIZED VIEW mvtest_tvvm;" db-types="PostgreSQL" />
- <sql-case id="refresh_by_postgresql_source_test_case23" value="REFRESH
MATERIALIZED VIEW tid_matview;" db-types="PostgreSQL" />
<sql-case id="reindex_by_postgresql_source_test_case1" value="REINDEX
(CONCURRENTLY) TABLE concur_reindex_tab;" db-types="PostgreSQL" />
<sql-case id="reindex_by_postgresql_source_test_case2" value="REINDEX
(VERBOSE) TABLE reindex_verbose;" db-types="PostgreSQL" />
<sql-case id="reindex_by_postgresql_source_test_case3" value="REINDEX
INDEX CONCURRENTLY concur_reindex_tab3_c2_excl;" db-types="PostgreSQL" />
@@ -6860,9 +6833,6 @@
<sql-case id="low_prepare_by_postgresql_source_test_case3" value="prepare
q as select 'some\more_text' as "a$title", E'
#<foo>%&^~|\n{bar}' as "junk", '
' as "empty", n as int from generate_series(1,2) as n;"
db-types="PostgreSQL" />
<sql-case id="low_prepare_by_postgresql_source_test_case4" value="prepare
q as select 'some\text' as "a\title", E'
<foo>\n<bar>' as "junk", ' ' as
"empty", n as int from generate_series(1,2) as n;"
db-types="PostgreSQL" />
<sql-case id="low_prepare_by_postgresql_source_test_case5" value="prepare
q as select 'some|text' as "a|title", '
' as "empty ", n as int from generate_series(1,2) as n;"
db-types="PostgreSQL" />
- <sql-case id="low_refresh_by_postgresql_source_test_case1" value="refresh
materialized view concurrently parallel_mat_view;" db-types="PostgreSQL" />
- <sql-case id="low_refresh_by_postgresql_source_test_case2" value="refresh
materialized view mvtest_error;" db-types="PostgreSQL" />
- <sql-case id="low_refresh_by_postgresql_source_test_case3" value="refresh
materialized view parallel_mat_view;" db-types="PostgreSQL" />
<sql-case id="low_reindex_by_postgresql_source_test_case1" value="reindex
index gist_pointidx;" db-types="PostgreSQL" />
<sql-case id="low_reindex_by_postgresql_source_test_case2" value="reindex
index spgist_point_idx;" db-types="PostgreSQL" />
<sql-case id="low_select_by_postgresql_source_test_case2" value="select
'"\b\f\r\n\t\v\"\''\\"'::jsonpath;"
db-types="PostgreSQL" />