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 8c07cf21414 Add PostgreSQL Create Materialized View Statement (#20093)
8c07cf21414 is described below
commit 8c07cf2141459fe57245b2fba33f0b1d7ef27c47
Author: Thanoshan MV <[email protected]>
AuthorDate: Fri Aug 12 06:07:19 2022 +0530
Add PostgreSQL Create Materialized View Statement (#20093)
* Add PostgreSQL Create Materialized View Statement
* Add empty line
---
.../main/antlr4/imports/postgresql/DDLStatement.g4 | 2 +-
.../parser/autogen/PostgreSQLStatementParser.g4 | 1 +
.../impl/PostgreSQLDALStatementSQLVisitor.java | 1 -
.../impl/PostgreSQLDDLStatementSQLVisitor.java | 11 ++++-
.../core/database/visitor/SQLVisitorRule.java | 4 +-
.../ddl/CreateMaterializedViewStatement.java | 28 +++++++++++++
.../PostgreSQLCreateMaterializedViewStatement.java | 29 +++++++++++++
.../jaxb/cases/domain/SQLParserTestCases.java | 10 +++--
.../CreateMaterializedViewStatementTestCase.java | 26 ++++++++++++
.../src/main/resources/case/dal/explain.xml | 3 ++
.../case/ddl/create-materialized-view.xml | 25 +++++++++++
.../main/resources/sql/supported/dal/explain.xml | 2 +
.../sql/supported/ddl/create-materialized-view.xml | 25 +++++++++++
.../main/resources/sql/unsupported/unsupported.xml | 48 ----------------------
14 files changed, 159 insertions(+), 56 deletions(-)
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 f057f7491bc..28e804b0497 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
@@ -973,7 +973,7 @@ createMaterializedView
;
createMvTarget
- : qualifiedName optColumnList? tableAccessMethodClause (WITH reloptions)?
(TABLESPACE name)?
+ : qualifiedName optColumnList? tableAccessMethodClause? (WITH reloptions)?
(TABLESPACE name)?
;
alterPolicy
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 bd390feca2c..9e3560f63a8 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
@@ -173,5 +173,6 @@ execute
| alterStatistics
| createGroup
| alterSubscription
+ | createMaterializedView
) 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/PostgreSQLDALStatementSQLVisitor.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/PostgreSQLDALStatementSQLVisitor.java
index e8bfcff1047..1efa6ea5dfa 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/PostgreSQLDALStatementSQLVisitor.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/PostgreSQLDALStatementSQLVisitor.java
@@ -181,7 +181,6 @@ public final class PostgreSQLDALStatementSQLVisitor extends
PostgreSQLStatementS
} else if (null != ctx.executeStmt()) {
return visit(ctx.executeStmt());
} else if (null != ctx.createMaterializedView()) {
- // TODO visit create materialized view statement
return visit(ctx.createMaterializedView());
} else {
// TODO visit refresh materialized view statement
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 aa17dd39e74..d7c60e3f1d2 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
@@ -43,7 +43,6 @@ import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.Al
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterPolicyContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterProcedureContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterPublicationContext;
-import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterSubscriptionContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterRenameViewContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterRoutineContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterRuleContext;
@@ -51,6 +50,7 @@ import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.Al
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterSequenceContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterServerContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterStatisticsContext;
+import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterSubscriptionContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterTableActionContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterTableContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.AlterTablespaceContext;
@@ -83,6 +83,7 @@ import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.Cr
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.CreateFunctionContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.CreateIndexContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.CreateLanguageContext;
+import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.CreateMaterializedViewContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.CreateProcedureContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.CreateRuleContext;
import
org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser.CreateSchemaContext;
@@ -216,13 +217,13 @@ import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterPolicyStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterProcedureStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterPublicationStatement;
-import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterSubscriptionStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterRoutineStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterRuleStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterSchemaStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterSequenceStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterServerStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterStatisticsStatement;
+import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterSubscriptionStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterTableStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterTablespaceStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLAlterTextSearchStatement;
@@ -244,6 +245,7 @@ import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateFunctionStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateIndexStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateLanguageStatement;
+import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateMaterializedViewStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateProcedureStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateRuleStatement;
import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateSchemaStatement;
@@ -1351,4 +1353,9 @@ public final class PostgreSQLDDLStatementSQLVisitor
extends PostgreSQLStatementS
public ASTNode visitCreateForeignTable(final CreateForeignTableContext
ctx) {
return new PostgreSQLCreateForeignTableStatement();
}
+
+ @Override
+ public ASTNode visitCreateMaterializedView(final
CreateMaterializedViewContext ctx) {
+ return new PostgreSQLCreateMaterializedViewStatement();
+ }
}
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 f059c4c849a..53f5000fd2b 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
@@ -632,7 +632,9 @@ public enum SQLVisitorRule {
CREATE_FOREIGN_TABLE("CreateForeignTable", SQLStatementType.DDL),
- CREATE_GROUP("CreateGroup", SQLStatementType.DCL);
+ CREATE_GROUP("CreateGroup", SQLStatementType.DCL),
+
+ CREATE_MATERIALIZED_VIEW("CreateMaterializedView", 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/ddl/CreateMaterializedViewStatement.java
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/statement/ddl/CreateMaterializedViewStatement.java
new file mode 100644
index 00000000000..65596c27002
--- /dev/null
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/statement/ddl/CreateMaterializedViewStatement.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;
+
+/**
+ * Create materialized view statement.
+ */
+@ToString(callSuper = true)
+public abstract class CreateMaterializedViewStatement 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/ddl/PostgreSQLCreateMaterializedViewStatement.java
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/postgresql/ddl/PostgreSQLCreateMaterializedViewStatement.java
new file mode 100644
index 00000000000..f685d7f98fa
--- /dev/null
+++
b/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/postgresql/ddl/PostgreSQLCreateMaterializedViewStatement.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.CreateMaterializedViewStatement;
+import
org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.PostgreSQLStatement;
+
+/**
+ * PostgreSQL create materialized view statement.
+ */
+@ToString(callSuper = true)
+public final class PostgreSQLCreateMaterializedViewStatement extends
CreateMaterializedViewStatement implements PostgreSQLStatement {
+}
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 8c0e73ae85d..bc3b62fd767 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
@@ -138,10 +138,10 @@ import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterSchemaStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterSequenceStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterServerStatementTestCase;
-import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterStatisticsStatementTestCase;
-import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterSubscriptionStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterServiceStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterSessionStatementTestCase;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterStatisticsStatementTestCase;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterSubscriptionStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterSynonymStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterSystemStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.AlterTableStatementTestCase;
@@ -179,6 +179,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.CreateInmemoryJoinGroupStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.CreateLanguageStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.CreateLockdownProfileStatementTestCase;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.CreateMaterializedViewStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.CreatePFileStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.CreateProcedureStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.ddl.CreatePublicationStatementTestCase;
@@ -292,12 +293,12 @@ import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.ral.ShowAuthorityRuleStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.ral.ShowInstanceInfoStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.ral.ShowInstanceListStatementTestCase;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.ral.ShowMigrationListStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.ral.ShowModeInfoStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.ral.ShowReadwriteSplittingHintStatusStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.ral.ShowReadwriteSplittingReadResourcesStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.ral.ShowSQLParserRuleStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.ral.ShowSQLTranslatorRuleStatementTestCase;
-import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.ral.ShowMigrationListStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.ral.ShowShardingHintStatusStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.ral.ShowTableMetadataStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.ral.ShowTrafficRulesStatementTestCase;
@@ -1651,6 +1652,9 @@ public final class SQLParserTestCases {
@XmlElement(name = "create-group")
private final List<CreateGroupStatementTestCase>
createGroupStatementTestCases = new LinkedList<>();
+ @XmlElement(name = "create-materialized-view")
+ private final List<CreateMaterializedViewStatementTestCase>
createMaterializedViewStatementTestCases = new LinkedList<>();
+
/**
* Get all SQL parser test cases.
*
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/CreateMaterializedViewStatementTestCase.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/CreateMaterializedViewStatementTestCase.java
new file mode 100644
index 00000000000..9d9b15f44c7
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/ddl/CreateMaterializedViewStatementTestCase.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;
+
+/**
+ * Create materialized view statement test case.
+ */
+public final class CreateMaterializedViewStatementTestCase extends
SQLParserTestCase {
+}
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dal/explain.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dal/explain.xml
index bb5d16904a3..bfdaec254f0 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dal/explain.xml
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/dal/explain.xml
@@ -281,4 +281,7 @@
</limit>
</select>
</describe>
+
+ <describe sql-case-id="explain_create_materialized_view_with_data"/>
+ <describe sql-case-id="explain_create_materialized_view_with_no_data"/>
</sql-parser-test-cases>
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/ddl/create-materialized-view.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/ddl/create-materialized-view.xml
new file mode 100644
index 00000000000..ffbdfdded5f
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/ddl/create-materialized-view.xml
@@ -0,0 +1,25 @@
+<?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>
+ <create-materialized-view
sql-case-id="create_materialized_view_with_if_not_exists" />
+ <create-materialized-view sql-case-id="create_materialized_view" />
+ <create-materialized-view
sql-case-id="create_materialized_view_with_using" />
+ <create-materialized-view
sql-case-id="create_materialized_view_with_no_data" />
+ <create-materialized-view sql-case-id="create_materialized_view_with_data"
/>
+</sql-parser-test-cases>
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/dal/explain.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/dal/explain.xml
index f2ad8245d6f..96e880092fe 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/dal/explain.xml
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/dal/explain.xml
@@ -36,4 +36,6 @@
<sql-case id="describe_table_with_col_name" value="DESCRIBE tableName
colName" db-types="MySQL" />
<sql-case id="describe_table_with_placeholder" value="DESC tableName ___"
db-types="MySQL" />
<sql-case id="describe_table_with_wild" value="DESC tableName `u%`"
db-types="MySQL" />
+ <sql-case id="explain_create_materialized_view_with_data" value="EXPLAIN
(ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) CREATE MATERIALIZED VIEW
matview_schema.mv_withdata2 (a) AS SELECT generate_series(1, 10) WITH DATA;"
db-types="PostgreSQL" />
+ <sql-case id="explain_create_materialized_view_with_no_data"
value="EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) CREATE
MATERIALIZED VIEW matview_schema.mv_nodata2 (a) AS SELECT generate_series(1,
10) WITH NO DATA;" db-types="PostgreSQL" />
</sql-cases>
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/ddl/create-materialized-view.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/ddl/create-materialized-view.xml
new file mode 100644
index 00000000000..3bc8aa4d22e
--- /dev/null
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/ddl/create-materialized-view.xml
@@ -0,0 +1,25 @@
+<?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="create_materialized_view_with_if_not_exists" value="CREATE
MATERIALIZED VIEW IF NOT EXISTS mvtest_mv_foo AS SELECT * FROM
mvtest_foo_data;" db-types="PostgreSQL" />
+ <sql-case id="create_materialized_view" value="CREATE MATERIALIZED VIEW
addr_nsp.genmatview AS SELECT * FROM addr_nsp.gentable;" db-types="PostgreSQL"
/>
+ <sql-case id="create_materialized_view_with_using" value="CREATE
MATERIALIZED VIEW mat_view_heap_psql USING heap_psql AS SELECT f1 from
tbl_heap_psql;" db-types="PostgreSQL" />
+ <sql-case id="create_materialized_view_with_no_data" value="CREATE
MATERIALIZED VIEW matview_schema.mv_nodata1 (a) AS SELECT generate_series(1,
10) WITH NO DATA;" db-types="PostgreSQL" />
+ <sql-case id="create_materialized_view_with_data" value="CREATE
MATERIALIZED VIEW matview_schema.mv_withdata1 (a) AS SELECT
generate_series(1, 10) WITH DATA;" 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 84161e126a4..a4600671fb0 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
@@ -3472,45 +3472,6 @@
<sql-case id="create_by_postgresql_source_test_case292" value="CREATE
FUNCTION y_trigger() RETURNS trigger AS $$ begin raise notice
'y_trigger: a = %', new.a; return new; end; $$ LANGUAGE plpgsql;"
db-types="PostgreSQL" />
<sql-case id="create_by_postgresql_source_test_case297" value="CREATE
INDEX IF NOT EXISTS ON onek USING btree(unique1 int4_ops);"
db-types="PostgreSQL" />
<sql-case id="create_by_postgresql_source_test_case298" value="CREATE
INDEX brinidx_bloom ON brintest_bloom USING brin ( byteacol
bytea_bloom_ops(n_distinct_per_range = -1.1) );" db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case299" value="CREATE
MATERIALIZED VIEW IF NOT EXISTS matview_ine_tab AS SELECT 1 / CREATE
MATERIALIZED VIEW matview_ine_tab AS SELECT 1 / 0 WITH NO DAT CREATE
MATERIALIZED VIEW IF NOT EXISTS matview_ine_tab AS SELECT 1 / 0 WITH NO DAT
EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) CREATE MATERIALIZED
VIEW matview_ine_tab AS SELECT 1 EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF,
TIMING OFF) CREATE MATERIALIZED VIEW IF [...]
- <sql-case id="create_by_postgresql_source_test_case300" value="CREATE
MATERIALIZED VIEW IF NOT EXISTS mvtest_mv_foo AS SELECT * FROM
mvtest_foo_data;" db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case301" value="CREATE
MATERIALIZED VIEW addr_nsp.genmatview AS SELECT * FROM addr_nsp.gentable;"
db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case302" value="CREATE
MATERIALIZED VIEW compressmv(x) AS SELECT * FROM cmdata1;"
db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case303" value="CREATE
MATERIALIZED VIEW concur_reindex_matview AS SELECT * FROM concur_reindex_tab;"
db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case304" value="CREATE
MATERIALIZED VIEW mat_view_heap_psql USING heap_psql AS SELECT f1 from
tbl_heap_psql;" db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case305" value="CREATE
MATERIALIZED VIEW matview AS SELECT col1 FROM table2;" db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case306" value="CREATE
MATERIALIZED VIEW matview_ine_tab AS SELECT 1 / 0;" db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case307" value="CREATE
MATERIALIZED VIEW matview_ine_tab AS SELECT 1;" db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case308" value="CREATE
MATERIALIZED VIEW matview_schema.mv_nodata1 (a) AS SELECT generate_series(1,
10) WITH NO DATA;" db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case309" value="CREATE
MATERIALIZED VIEW matview_schema.mv_withdata1 (a) AS SELECT
generate_series(1, 10) WITH DATA;" db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case310" value="CREATE
MATERIALIZED VIEW mv_test2 AS SELECT moo, 2*moo FROM mvtest_vt2 UNION ALL
SELECT moo, 3*moo FROM mvtest_vt2;" db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case311" value="CREATE
MATERIALIZED VIEW mv_test3 AS SELECT * FROM mv_test2 WHERE moo = 12345;"
db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case312" value="CREATE
MATERIALIZED VIEW mv_unspecified_types AS SELECT 42 as i, 42.5 as num,
'foo' as u, 'foo'::unknown as u2, null as n;"
db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case313" value="CREATE
MATERIALIZED VIEW mvtest_bb AS SELECT * FROM mvtest_tvvmv;"
db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case314" value="CREATE
MATERIALIZED VIEW mvtest_boxmv AS SELECT * FROM mvtest_boxes;"
db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case315" value="CREATE
MATERIALIZED VIEW mvtest_mv AS SELECT * FROM mvtest_foo;" db-types="PostgreSQL"
/>
- <sql-case id="create_by_postgresql_source_test_case316" value="CREATE
MATERIALIZED VIEW mvtest_mv AS SELECT * FROM mvtest_foo;" db-types="PostgreSQL"
/>
- <sql-case id="create_by_postgresql_source_test_case317" value="CREATE
MATERIALIZED VIEW mvtest_mv1 AS SELECT 1 AS col1 WITH NO DATA;"
db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case318" value="CREATE
MATERIALIZED VIEW mvtest_mv2 AS SELECT * FROM mvtest_mv1 WHERE col1 = (SELECT
LEAST(col1) FROM mvtest_mv1) WITH NO DATA;" db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case319" value="CREATE
MATERIALIZED VIEW mvtest_mv_foo AS SELECT * FROM mvtest_foo_data;"
db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case320" value="CREATE
MATERIALIZED VIEW mvtest_mv_foo AS SELECT * FROM mvtest_foo_data;"
db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case321" value="CREATE
MATERIALIZED VIEW mvtest_mv_v (ii, jj) AS SELECT i, j FROM mvtest_v;"
db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case322" value="CREATE
MATERIALIZED VIEW mvtest_mv_v (ii, jj, kk) AS SELECT i, j FROM mvtest_v;"
db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case323" value="CREATE
MATERIALIZED VIEW mvtest_mv_v AS SELECT a FROM mvtest_v WHERE a <= 5;"
db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case324" value="CREATE
MATERIALIZED VIEW mvtest_mv_v_2 (ii) AS SELECT i, j FROM mvtest_v;"
db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case325" value="CREATE
MATERIALIZED VIEW mvtest_mv_v_3 (ii, jj) AS SELECT i, j FROM mvtest_v WITH NO
DATA;" db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case326" value="CREATE
MATERIALIZED VIEW mvtest_mv_v_3 (ii, jj, kk) AS SELECT i, j FROM mvtest_v WITH
NO DATA;" db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case327" value="CREATE
MATERIALIZED VIEW mvtest_mv_v_4 (ii) AS SELECT i, j FROM mvtest_v WITH NO
DATA;" db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case328" value="CREATE
MATERIALIZED VIEW mvtest_tm AS SELECT type, sum(amt) AS totamt FROM mvtest_t
GROUP BY type WITH NO DATA;" db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case329" value="CREATE
MATERIALIZED VIEW mvtest_tmm AS SELECT sum(totamt) AS grandtot FROM mvtest_tm;"
db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case330" value="CREATE
MATERIALIZED VIEW mvtest_tvm AS SELECT * FROM mvtest_tv ORDER BY type;"
db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case331" value="CREATE
MATERIALIZED VIEW mvtest_tvmm AS SELECT sum(totamt) AS grandtot FROM
mvtest_tvm;" db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case332" value="CREATE
MATERIALIZED VIEW mvtest_tvvm AS SELECT * FROM mvtest_tvv;"
db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case333" value="CREATE
MATERIALIZED VIEW ptif_test_matview AS SELECT 1;" db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case334" value="CREATE
MATERIALIZED VIEW tableam_tblmv_heap2 USING heap2 AS SELECT * FROM
tableam_tbl_heap2;" db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case335" value="CREATE
MATERIALIZED VIEW tableam_tblmv_heapx USING heap2 AS SELECT * FROM
tableam_tbl_heapx;" db-types="PostgreSQL" />
- <sql-case id="create_by_postgresql_source_test_case336" value="CREATE
MATERIALIZED VIEW tid_matview AS SELECT a FROM tid_tab;" db-types="PostgreSQL"
/>
- <sql-case id="create_by_postgresql_source_test_case337" value="CREATE
MATERIALIZED VIEW tststats.mv AS SELECT * FROM tststats.t;"
db-types="PostgreSQL" />
<sql-case id="create_by_postgresql_source_test_case338" value="CREATE
OPERATOR !=- ( rightarg = int8, procedure = factorial );"
db-types="PostgreSQL" />
<sql-case id="create_by_postgresql_source_test_case339" value="CREATE
OPERATOR !== ( PROCEDURE = int8ne, LEFTARG = bigint,
RIGHTARG = bigint, NEGATOR = ===, COMMUTATOR = !== );"
db-types="PostgreSQL" />
<sql-case id="create_by_postgresql_source_test_case340" value="CREATE
OPERATOR ## ( leftarg = path, rightarg = path, function = path_inter,
commutator = ## );" db-types="PostgreSQL" />
@@ -4103,8 +4064,6 @@
<sql-case id="execute_by_postgresql_source_test_case16" value="EXECUTE
test;" db-types="PostgreSQL" />
<sql-case id="execute_by_postgresql_source_test_case17" value="EXECUTE
vprep;" db-types="PostgreSQL" />
<sql-case id="execute_by_postgresql_source_test_case18" value="EXECUTE
vprep;" db-types="PostgreSQL" />
- <sql-case id="explain_by_postgresql_source_test_case1" value="EXPLAIN
(ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) CREATE MATERIALIZED VIEW
matview_schema.mv_nodata2 (a) AS SELECT generate_series(1, 10) WITH NO DATA;"
db-types="PostgreSQL" />
- <sql-case id="explain_by_postgresql_source_test_case2" value="EXPLAIN
(ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) CREATE MATERIALIZED VIEW
matview_schema.mv_withdata2 (a) AS SELECT generate_series(1, 10) WITH DATA;"
db-types="PostgreSQL" />
<sql-case id="explain_by_postgresql_source_test_case3" value="EXPLAIN
(ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) CREATE TABLE ctas_ine_tbl AS
EXECUTE ctas_ine_quer EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF)
CREATE TABLE IF NOT EXISTS ctas_ine_tbl AS EXECUTE ctas_ine_quer DROP TABLE
ctas_ine_tbl;" db-types="PostgreSQL" />
<sql-case id="explain_by_postgresql_source_test_case4" value="EXPLAIN
(ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) CREATE TABLE ctas_ine_tbl AS
SELECT 1 / EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) CREATE
TABLE IF NOT EXISTS ctas_ine_tbl AS SELECT 1 / EXPLAIN (ANALYZE, COSTS OFF,
SUMMARY OFF, TIMING OFF) CREATE TABLE ctas_ine_tbl AS SELECT 1 / 0 WITH NO
DAT EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) CREATE TABLE IF NOT
EXISTS ctas_ine_tbl AS SELECT 1 [...]
<sql-case id="explain_by_postgresql_source_test_case5" value="EXPLAIN
(ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF) CREATE TABLE
selinto_schema.tbl_nodata2 (a) AS SELECT generate_series(1,3) WITH NO DATA;"
db-types="PostgreSQL" />
@@ -4219,9 +4178,6 @@
<sql-case id="explain_by_postgresql_source_test_case114" value="EXPLAIN
(COSTS OFF) SELECT rank() OVER (ORDER BY p <-> point '123,456')
n, p <-> point '123,456' dist, id FROM quad_poly_tbl WHERE p
<@ polygon '((300,300),(400,600),(600,500),(700,200))';"
db-types="PostgreSQL" />
<sql-case id="explain_by_postgresql_source_test_case115" value="EXPLAIN
(COSTS OFF) UPDATE current_check SET payload = payload WHERE CURRENT OF
current_check_cursor;" db-types="PostgreSQL" />
<sql-case id="explain_by_postgresql_source_test_case117" value="EXPLAIN
(VERBOSE, COSTS OFF) UPDATE update_test t SET (a, b) = (SELECT b, a FROM
update_test s WHERE s.a = t.a) WHERE CURRENT_USER = SESSION_USER;"
db-types="PostgreSQL" />
- <sql-case id="explain_by_postgresql_source_test_case118" value="EXPLAIN
(costs off) CREATE MATERIALIZED VIEW mvtest_tm AS SELECT type, sum(amt) AS
totamt FROM mvtest_t GROUP BY type WITH NO DATA;" db-types="PostgreSQL" />
- <sql-case id="explain_by_postgresql_source_test_case119" value="EXPLAIN
(costs off) CREATE MATERIALIZED VIEW mvtest_tvm AS SELECT * FROM mvtest_tv
ORDER BY type;" db-types="PostgreSQL" />
- <sql-case id="explain_by_postgresql_source_test_case120" value="EXPLAIN
(costs off) CREATE MATERIALIZED VIEW mvtest_tvvm AS SELECT * FROM
mvtest_tvv;" db-types="PostgreSQL" />
<sql-case id="import_by_postgresql_source_test_case1" value="IMPORT
FOREIGN SCHEMA s1 EXCEPT (t1) FROM SERVER s9 INTO public;"
db-types="PostgreSQL" />
<sql-case id="import_by_postgresql_source_test_case2" value="IMPORT
FOREIGN SCHEMA s1 EXCEPT (t1, t2) FROM SERVER s9 INTO public OPTIONS (option1
'value1', option2 'value2');" db-types="PostgreSQL" />
<sql-case id="import_by_postgresql_source_test_case3" value="IMPORT
FOREIGN SCHEMA s1 FROM SERVER s9 INTO public;" db-types="PostgreSQL" />
@@ -5997,9 +5953,6 @@
<sql-case id="low_create_by_postgresql_source_test_case301" value="create
function wait_for_stats() returns void as $$ declare start_time timestamptz
:= clock_timestamp(); updated1 bool; updated2 bool; updated3 bool;
updated4 bool; begin for i in 1 .. 300 loop SELECT (st.seq_scan >=
pr.seq_scan + 1) INTO updated1 FROM pg_stat_user_tables AS st, pg_class
AS cl, prevstats AS pr WHERE st.relname='tenk2' AND
cl.relname='tenk2'; SELECT [...]
<sql-case id="low_create_by_postgresql_source_test_case302" value="create
function zero_divide() returns int as $$ declare v int := 0; begin return 10
/ v; end; $$ language plpgsql;" db-types="PostgreSQL" />
<sql-case id="low_create_by_postgresql_source_test_case303" value="create
index on test_range_elem using spgist(int4range(i,i+10));"
db-types="PostgreSQL" />
- <sql-case id="low_create_by_postgresql_source_test_case304" value="create
materialized view mvtest_error as select 1/0 as x with no data;"
db-types="PostgreSQL" />
- <sql-case id="low_create_by_postgresql_source_test_case305" value="create
materialized view mvtest_error as select 1/0 as x;" db-types="PostgreSQL" />
- <sql-case id="low_create_by_postgresql_source_test_case306" value="create
materialized view parallel_mat_view as select length(stringu1) from tenk1
group by length(stringu1);" db-types="PostgreSQL" />
<sql-case id="low_create_by_postgresql_source_test_case307" value="create
operator < ( procedure = int8alias1lt, leftarg = int8alias1,
rightarg = int8alias1 );" db-types="PostgreSQL" />
<sql-case id="low_create_by_postgresql_source_test_case308" value="create
operator <> ( leftarg = myint, rightarg = myint, commutator =
<>, negator = =, procedure = myintne, restrict = eqsel,
join = eqjoinsel, merges );" db-types="PostgreSQL" />
<sql-case id="low_create_by_postgresql_source_test_case309" value="create
operator = ( procedure = int8alias1eq, leftarg = int8, rightarg =
int8alias1, restrict = eqsel, join = eqjoinsel, merges );"
db-types="PostgreSQL" />
@@ -6418,7 +6371,6 @@
<sql-case id="low_execute_by_postgresql_source_test_case122"
value="execute q;" db-types="PostgreSQL" />
<sql-case id="low_execute_by_postgresql_source_test_case123"
value="execute q;" db-types="PostgreSQL" />
<sql-case id="low_execute_by_postgresql_source_test_case124"
value="execute q;" db-types="PostgreSQL" />
- <sql-case id="low_explain_by_postgresql_source_test_case1" value="explain
(costs off) create materialized view parallel_mat_view as select
length(stringu1) from tenk1 group by length(stringu1);" db-types="PostgreSQL" />
<sql-case id="low_explain_by_postgresql_source_test_case2" value="explain
(costs off) create table parallel_write as select length(stringu1) from
tenk1 group by length(stringu1);" db-types="PostgreSQL" />
<sql-case id="low_explain_by_postgresql_source_test_case3" value="explain
(costs off) create table parallel_write as execute prep_stmt;"
db-types="PostgreSQL" />
<sql-case id="low_explain_by_postgresql_source_test_case4" value="explain
(costs off) select * from hp_contradict_test where a === 1 and b === 1 and a is
null;" db-types="PostgreSQL" />