You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2025/07/11 02:02:12 UTC
(shardingsphere) branch master updated: fix:Support Hive CREATE DATABASE statment parse (#35929)
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 affb40ba211 fix:Support Hive CREATE DATABASE statment parse (#35929)
affb40ba211 is described below
commit affb40ba211d59eaf8db32ee968fed7e7c913528
Author: Claire <cl...@163.com>
AuthorDate: Fri Jul 11 10:02:05 2025 +0800
fix:Support Hive CREATE DATABASE statment parse (#35929)
* support CREATE DATABASE statement
* fix:support CREATE DATABASE statement
* update RELEASE NOTE
* update code
* update code
* update code
* update again
---
RELEASE-NOTES.md | 1 +
parser/sql/dialect/hive/pom.xml | 6 ++
.../hive/DDLStatement.g4} | 26 +++++----
.../src/main/antlr4/imports/hive/HiveKeyword.g4 | 16 ++++++
.../sql/parser/autogen/HiveStatement.g4 | 3 +-
.../visitor/statement/HiveStatementVisitor.java | 1 -
.../statement/HiveStatementVisitorFacade.java | 3 +-
.../statement/type/HiveDDLStatementVisitor.java | 37 ++++++++++++
.../it/hive/internal/InternalHiveParserIT.java} | 17 ++----
.../internal/InternalUnsupportedHiveParserIT.java} | 17 ++----
.../main/resources/case/ddl/create-database.xml | 66 ++++++++++++++++++++++
.../sql/supported/ddl/create-database.xml | 66 ++++++++++++++++++++++
12 files changed, 224 insertions(+), 35 deletions(-)
diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md
index e7de8bfea9e..0ee953ec22a 100644
--- a/RELEASE-NOTES.md
+++ b/RELEASE-NOTES.md
@@ -50,6 +50,7 @@
1. SQL Parser: Support Oracle multiple backslash literal parsing - [#35784](https://github.com/apache/shardingsphere/pull/35784)
1. Proxy: Implement write method for PostgreSQL bool binary data type - [#35831](https://github.com/apache/shardingsphere/pull/35831)
1. SQL Binder: Add alter table metadata check - [#35877](https://github.com/apache/shardingsphere/pull/35877)
+1. SQL Parser: Support Hive CREATE DATABASE statment parse - [#35929](https://github.com/apache/shardingsphere/pull/35929)
### Bug Fixes
diff --git a/parser/sql/dialect/hive/pom.xml b/parser/sql/dialect/hive/pom.xml
index 40a8dff1544..16afc55d785 100644
--- a/parser/sql/dialect/hive/pom.xml
+++ b/parser/sql/dialect/hive/pom.xml
@@ -48,5 +48,11 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-test-it-parser</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/parser/sql/dialect/hive/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/HiveStatement.g4 b/parser/sql/dialect/hive/src/main/antlr4/imports/hive/DDLStatement.g4
similarity index 68%
copy from parser/sql/dialect/hive/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/HiveStatement.g4
copy to parser/sql/dialect/hive/src/main/antlr4/imports/hive/DDLStatement.g4
index f37d6c71d0d..38f90d7e3c9 100644
--- a/parser/sql/dialect/hive/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/HiveStatement.g4
+++ b/parser/sql/dialect/hive/src/main/antlr4/imports/hive/DDLStatement.g4
@@ -15,16 +15,22 @@
* limitations under the License.
*/
-grammar HiveStatement;
+grammar DDLStatement;
-import Comments, DMLStatement;
+import BaseRule;
-// TODO correct hive SQL parsing according to official documentation
-execute
- : (select
- | insert
- | update
- | delete
- ) (SEMI_ EOF? | EOF)
- | EOF
+createDatabase
+ : CREATE REMOTE? (DATABASE | SCHEMA) ifNotExists? identifier (COMMENT string_)? (LOCATION string_)? (MANAGEDLOCATION string_)? (WITH DBPROPERTIES LP_ dbProperties RP_)?
+ ;
+
+ifNotExists
+ : IF NOT EXISTS
+ ;
+
+dbProperties
+ : dbProperty (COMMA_ dbProperty)*
+ ;
+
+dbProperty
+ : string_ EQ_ string_
;
diff --git a/parser/sql/dialect/hive/src/main/antlr4/imports/hive/HiveKeyword.g4 b/parser/sql/dialect/hive/src/main/antlr4/imports/hive/HiveKeyword.g4
index 2d1bcdcd64b..900e886e485 100644
--- a/parser/sql/dialect/hive/src/main/antlr4/imports/hive/HiveKeyword.g4
+++ b/parser/sql/dialect/hive/src/main/antlr4/imports/hive/HiveKeyword.g4
@@ -3142,3 +3142,19 @@ ZONE
: Z O N E
;
+REMOTE
+ : R E M O T E
+ ;
+
+LOCATION
+ : L O C A T I O N
+ ;
+
+MANAGEDLOCATION
+ : M A N A G E D L O C A T I O N
+ ;
+
+DBPROPERTIES
+ : D B P R O P E R T I E S
+ ;
+
diff --git a/parser/sql/dialect/hive/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/HiveStatement.g4 b/parser/sql/dialect/hive/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/HiveStatement.g4
index f37d6c71d0d..4525c2fe5d6 100644
--- a/parser/sql/dialect/hive/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/HiveStatement.g4
+++ b/parser/sql/dialect/hive/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/HiveStatement.g4
@@ -17,7 +17,7 @@
grammar HiveStatement;
-import Comments, DMLStatement;
+import Comments, DMLStatement, DDLStatement;
// TODO correct hive SQL parsing according to official documentation
execute
@@ -25,6 +25,7 @@ execute
| insert
| update
| delete
+ | createDatabase
) (SEMI_ EOF? | EOF)
| EOF
;
diff --git a/parser/sql/dialect/hive/src/main/java/org/apache/shardingsphere/sql/parser/hive/visitor/statement/HiveStatementVisitor.java b/parser/sql/dialect/hive/src/main/java/org/apache/shardingsphere/sql/parser/hive/visitor/statement/HiveStatementVisitor.java
index 029dbadf9c8..a58b01b819d 100644
--- a/parser/sql/dialect/hive/src/main/java/org/apache/shardingsphere/sql/parser/hive/visitor/statement/HiveStatementVisitor.java
+++ b/parser/sql/dialect/hive/src/main/java/org/apache/shardingsphere/sql/parser/hive/visitor/statement/HiveStatementVisitor.java
@@ -84,7 +84,6 @@ import org.apache.shardingsphere.sql.parser.statement.core.value.literal.impl.Nu
import org.apache.shardingsphere.sql.parser.statement.core.value.literal.impl.OtherLiteralValue;
import org.apache.shardingsphere.sql.parser.statement.core.value.literal.impl.StringLiteralValue;
import org.apache.shardingsphere.sql.parser.statement.core.value.parametermarker.ParameterMarkerValue;
-
import java.util.Collection;
import java.util.LinkedList;
diff --git a/parser/sql/dialect/hive/src/main/java/org/apache/shardingsphere/sql/parser/hive/visitor/statement/HiveStatementVisitorFacade.java b/parser/sql/dialect/hive/src/main/java/org/apache/shardingsphere/sql/parser/hive/visitor/statement/HiveStatementVisitorFacade.java
index b47b8959342..fb0ee98fcf4 100644
--- a/parser/sql/dialect/hive/src/main/java/org/apache/shardingsphere/sql/parser/hive/visitor/statement/HiveStatementVisitorFacade.java
+++ b/parser/sql/dialect/hive/src/main/java/org/apache/shardingsphere/sql/parser/hive/visitor/statement/HiveStatementVisitorFacade.java
@@ -23,6 +23,7 @@ import org.apache.shardingsphere.sql.parser.api.visitor.statement.type.DDLStatem
import org.apache.shardingsphere.sql.parser.api.visitor.statement.type.DMLStatementVisitor;
import org.apache.shardingsphere.sql.parser.api.visitor.statement.type.LCLStatementVisitor;
import org.apache.shardingsphere.sql.parser.api.visitor.statement.type.TCLStatementVisitor;
+import org.apache.shardingsphere.sql.parser.hive.visitor.statement.type.HiveDDLStatementVisitor;
import org.apache.shardingsphere.sql.parser.hive.visitor.statement.type.HiveDMLStatementVisitor;
import org.apache.shardingsphere.sql.parser.spi.SQLStatementVisitorFacade;
@@ -38,7 +39,7 @@ public final class HiveStatementVisitorFacade implements SQLStatementVisitorFaca
@Override
public Class<? extends DDLStatementVisitor> getDDLVisitorClass() {
- throw new UnsupportedOperationException("");
+ return HiveDDLStatementVisitor.class;
}
@Override
diff --git a/parser/sql/dialect/hive/src/main/java/org/apache/shardingsphere/sql/parser/hive/visitor/statement/type/HiveDDLStatementVisitor.java b/parser/sql/dialect/hive/src/main/java/org/apache/shardingsphere/sql/parser/hive/visitor/statement/type/HiveDDLStatementVisitor.java
new file mode 100644
index 00000000000..91ed70f2d26
--- /dev/null
+++ b/parser/sql/dialect/hive/src/main/java/org/apache/shardingsphere/sql/parser/hive/visitor/statement/type/HiveDDLStatementVisitor.java
@@ -0,0 +1,37 @@
+/*
+ * 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.hive.visitor.statement.type;
+
+import org.apache.shardingsphere.sql.parser.api.visitor.statement.type.DDLStatementVisitor;
+import org.apache.shardingsphere.sql.parser.hive.visitor.statement.HiveStatementVisitor;
+import org.apache.shardingsphere.sql.parser.autogen.HiveStatementParser.CreateDatabaseContext;
+import org.apache.shardingsphere.sql.parser.statement.core.statement.type.ddl.database.CreateDatabaseStatement;
+import org.apache.shardingsphere.sql.parser.statement.core.value.identifier.IdentifierValue;
+import org.apache.shardingsphere.sql.parser.api.ASTNode;
+
+/**
+ * DDL statement visitor for Hive.
+ */
+public final class HiveDDLStatementVisitor extends HiveStatementVisitor implements DDLStatementVisitor {
+
+ @Override
+ public ASTNode visitCreateDatabase(final CreateDatabaseContext ctx) {
+ return new CreateDatabaseStatement(new IdentifierValue(ctx.identifier().getText()).getValue(),
+ null != ctx.ifNotExists());
+ }
+}
diff --git a/parser/sql/dialect/hive/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/HiveStatement.g4 b/parser/sql/dialect/hive/src/test/java/org/apache/shardingsphere/test/it/sql/parser/it/hive/internal/InternalHiveParserIT.java
similarity index 70%
copy from parser/sql/dialect/hive/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/HiveStatement.g4
copy to parser/sql/dialect/hive/src/test/java/org/apache/shardingsphere/test/it/sql/parser/it/hive/internal/InternalHiveParserIT.java
index f37d6c71d0d..a71c05488f4 100644
--- a/parser/sql/dialect/hive/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/HiveStatement.g4
+++ b/parser/sql/dialect/hive/src/test/java/org/apache/shardingsphere/test/it/sql/parser/it/hive/internal/InternalHiveParserIT.java
@@ -15,16 +15,11 @@
* limitations under the License.
*/
-grammar HiveStatement;
+package org.apache.shardingsphere.test.it.sql.parser.it.hive.internal;
-import Comments, DMLStatement;
+import org.apache.shardingsphere.test.it.sql.parser.internal.InternalSQLParserIT;
+import org.apache.shardingsphere.test.it.sql.parser.internal.InternalSQLParserITSettings;
-// TODO correct hive SQL parsing according to official documentation
-execute
- : (select
- | insert
- | update
- | delete
- ) (SEMI_ EOF? | EOF)
- | EOF
- ;
+@InternalSQLParserITSettings("Hive")
+class InternalHiveParserIT extends InternalSQLParserIT {
+}
diff --git a/parser/sql/dialect/hive/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/HiveStatement.g4 b/parser/sql/dialect/hive/src/test/java/org/apache/shardingsphere/test/it/sql/parser/it/hive/internal/InternalUnsupportedHiveParserIT.java
similarity index 69%
copy from parser/sql/dialect/hive/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/HiveStatement.g4
copy to parser/sql/dialect/hive/src/test/java/org/apache/shardingsphere/test/it/sql/parser/it/hive/internal/InternalUnsupportedHiveParserIT.java
index f37d6c71d0d..8757479bc24 100644
--- a/parser/sql/dialect/hive/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/HiveStatement.g4
+++ b/parser/sql/dialect/hive/src/test/java/org/apache/shardingsphere/test/it/sql/parser/it/hive/internal/InternalUnsupportedHiveParserIT.java
@@ -15,16 +15,11 @@
* limitations under the License.
*/
-grammar HiveStatement;
+package org.apache.shardingsphere.test.it.sql.parser.it.hive.internal;
-import Comments, DMLStatement;
+import org.apache.shardingsphere.test.it.sql.parser.internal.InternalSQLParserIT;
+import org.apache.shardingsphere.test.it.sql.parser.internal.InternalSQLParserITSettings;
-// TODO correct hive SQL parsing according to official documentation
-execute
- : (select
- | insert
- | update
- | delete
- ) (SEMI_ EOF? | EOF)
- | EOF
- ;
+@InternalSQLParserITSettings("Hive")
+class InternalUnsupportedHiveParserIT extends InternalSQLParserIT {
+}
diff --git a/test/it/parser/src/main/resources/case/ddl/create-database.xml b/test/it/parser/src/main/resources/case/ddl/create-database.xml
index e7adbc333e6..7604122307e 100644
--- a/test/it/parser/src/main/resources/case/ddl/create-database.xml
+++ b/test/it/parser/src/main/resources/case/ddl/create-database.xml
@@ -25,4 +25,70 @@
<create-database sql-case-id="create_database_with_file" />
<create-database sql-case-id="create_database_oracle1" />
<create-database sql-case-id="create_database_oracle2" />
+ <create-database sql-case-id="create_database_basic" />
+ <create-schema sql-case-id="create_schema_basic" />
+ <create-database sql-case-id="create_database_if_not_exists" />
+ <create-schema sql-case-id="create_schema_if_not_exists" />
+ <create-database sql-case-id="create_remote_database_basic" />
+ <create-schema sql-case-id="create_remote_schema_basic" />
+ <create-database sql-case-id="create_remote_database_if_not_exists" />
+ <create-schema sql-case-id="create_remote_schema_if_not_exists" />
+ <create-database sql-case-id="create_database_with_comment" />
+ <create-schema sql-case-id="create_schema_with_comment" />
+ <create-database sql-case-id="create_database_if_not_exists_with_comment" />
+ <create-schema sql-case-id="create_schema_if_not_exists_with_comment" />
+ <create-database sql-case-id="create_database_with_location_hive" />
+ <create-schema sql-case-id="create_schema_with_location" />
+ <create-database sql-case-id="create_database_if_not_exists_with_location" />
+ <create-schema sql-case-id="create_schema_if_not_exists_with_location" />
+ <create-database sql-case-id="create_database_with_managed_location" />
+ <create-schema sql-case-id="create_schema_with_managed_location" />
+ <create-database sql-case-id="create_database_if_not_exists_with_managed_location" />
+ <create-schema sql-case-id="create_schema_if_not_exists_with_managed_location" />
+ <create-database sql-case-id="create_database_with_properties" />
+ <create-schema sql-case-id="create_schema_with_properties" />
+ <create-database sql-case-id="create_database_with_single_property" />
+ <create-schema sql-case-id="create_schema_with_single_property" />
+ <create-database sql-case-id="create_database_if_not_exists_with_properties" />
+ <create-schema sql-case-id="create_schema_if_not_exists_with_properties" />
+ <create-database sql-case-id="create_database_with_comment_location" />
+ <create-schema sql-case-id="create_schema_with_comment_location" />
+ <create-database sql-case-id="create_database_with_comment_managedlocation" />
+ <create-schema sql-case-id="create_schema_with_comment_managedlocation" />
+ <create-database sql-case-id="create_database_with_comment_properties" />
+ <create-schema sql-case-id="create_schema_with_comment_properties" />
+ <create-database sql-case-id="create_database_with_location_managedlocation" />
+ <create-schema sql-case-id="create_schema_with_location_managedlocation" />
+ <create-database sql-case-id="create_database_with_location_properties" />
+ <create-schema sql-case-id="create_schema_with_location_properties" />
+ <create-database sql-case-id="create_database_with_managedlocation_properties" />
+ <create-schema sql-case-id="create_schema_with_managedlocation_properties" />
+ <create-database sql-case-id="create_database_with_location_managedlocation_properties" />
+ <create-schema sql-case-id="create_schema_with_location_managedlocation_properties" />
+ <create-database sql-case-id="create_database_with_comment_location_managedlocation" />
+ <create-schema sql-case-id="create_schema_with_comment_location_managedlocation" />
+ <create-database sql-case-id="create_database_with_comment_managedlocation_properties" />
+ <create-schema sql-case-id="create_schema_with_comment_managedlocation_properties" />
+ <create-database sql-case-id="create_database_with_all_options" />
+ <create-schema sql-case-id="create_schema_with_all_options" />
+ <create-database sql-case-id="create_remote_database_with_comment_managedlocation" />
+ <create-schema sql-case-id="create_remote_schema_with_comment_managedlocation" />
+ <create-database sql-case-id="create_remote_database_with_location_managedlocation" />
+ <create-schema sql-case-id="create_remote_schema_with_location_managedlocation" />
+ <create-database sql-case-id="create_remote_database_with_managedlocation_properties" />
+ <create-schema sql-case-id="create_remote_schema_with_managedlocation_properties" />
+ <create-database sql-case-id="create_remote_database_with_comment_location" />
+ <create-schema sql-case-id="create_remote_schema_with_comment_location" />
+ <create-database sql-case-id="create_remote_database_with_comment_properties" />
+ <create-schema sql-case-id="create_remote_schema_with_comment_properties" />
+ <create-database sql-case-id="create_remote_database_with_location_properties" />
+ <create-schema sql-case-id="create_remote_schema_with_location_properties" />
+ <create-database sql-case-id="create_remote_database_with_comment_location_managedlocation" />
+ <create-schema sql-case-id="create_remote_schema_with_comment_location_managedlocation" />
+ <create-database sql-case-id="create_remote_database_with_comment_managedlocation_properties" />
+ <create-schema sql-case-id="create_remote_schema_with_comment_managedlocation_properties" />
+ <create-database sql-case-id="create_remote_database_with_location_managedlocation_properties" />
+ <create-schema sql-case-id="create_remote_schema_with_location_managedlocation_properties" />
+ <create-database sql-case-id="create_remote_database_with_all_options" />
+ <create-schema sql-case-id="create_remote_schema_with_all_options" />
</sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/sql/supported/ddl/create-database.xml b/test/it/parser/src/main/resources/sql/supported/ddl/create-database.xml
index d87f6757a41..090f169d4f5 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/create-database.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/create-database.xml
@@ -90,4 +90,70 @@
USER_DATA TABLESPACE usertbs
DATAFILE '/u01/app/oracle/oradata/pdbseed/usertbs01.dbf'
SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED" db-types="Oracle" />
+ <sql-case id="create_database_basic" value="CREATE DATABASE lusiadas;" db-types="Hive" />
+ <sql-case id="create_schema_basic" value="CREATE SCHEMA lusiadas;" db-types="Hive" />
+ <sql-case id="create_database_if_not_exists" value="CREATE DATABASE IF NOT EXISTS lusiadas;" db-types="Hive" />
+ <sql-case id="create_schema_if_not_exists" value="CREATE SCHEMA IF NOT EXISTS lusiadas;" db-types="Hive" />
+ <sql-case id="create_remote_database_basic" value="CREATE REMOTE DATABASE lusiadas;" db-types="Hive" />
+ <sql-case id="create_remote_schema_basic" value="CREATE REMOTE SCHEMA lusiadas;" db-types="Hive" />
+ <sql-case id="create_remote_database_if_not_exists" value="CREATE REMOTE DATABASE IF NOT EXISTS lusiadas;" db-types="Hive" />
+ <sql-case id="create_remote_schema_if_not_exists" value="CREATE REMOTE SCHEMA IF NOT EXISTS lusiadas;" db-types="Hive" />
+ <sql-case id="create_database_with_comment" value="CREATE DATABASE lusiadas COMMENT 'Hive test database';" db-types="Hive" />
+ <sql-case id="create_schema_with_comment" value="CREATE SCHEMA lusiadas COMMENT 'Hive test schema';" db-types="Hive" />
+ <sql-case id="create_database_if_not_exists_with_comment" value="CREATE DATABASE IF NOT EXISTS lusiadas COMMENT 'Hive test database';" db-types="Hive" />
+ <sql-case id="create_schema_if_not_exists_with_comment" value="CREATE SCHEMA IF NOT EXISTS lusiadas COMMENT 'Hive test schema';" db-types="Hive" />
+ <sql-case id="create_database_with_location_hive" value="CREATE DATABASE lusiadas LOCATION '/lusiadas.db';" db-types="Hive" />
+ <sql-case id="create_schema_with_location" value="CREATE SCHEMA lusiadas LOCATION '/lusiadas.db';" db-types="Hive" />
+ <sql-case id="create_database_if_not_exists_with_location" value="CREATE DATABASE IF NOT EXISTS lusiadas LOCATION '/lusiadas.db';" db-types="Hive" />
+ <sql-case id="create_schema_if_not_exists_with_location" value="CREATE SCHEMA IF NOT EXISTS lusiadas LOCATION '/lusiadas.db';" db-types="Hive" />
+ <sql-case id="create_database_with_managed_location" value="CREATE DATABASE lusiadas MANAGEDLOCATION '/lusiadas.db';" db-types="Hive" />
+ <sql-case id="create_schema_with_managed_location" value="CREATE SCHEMA lusiadas MANAGEDLOCATION '/lusiadas.db';" db-types="Hive" />
+ <sql-case id="create_database_if_not_exists_with_managed_location" value="CREATE DATABASE IF NOT EXISTS lusiadas MANAGEDLOCATION '/lusiadas.db';" db-types="Hive" />
+ <sql-case id="create_schema_if_not_exists_with_managed_location" value="CREATE SCHEMA IF NOT EXISTS lusiadas MANAGEDLOCATION '/lusiadas.db';" db-types="Hive" />
+ <sql-case id="create_database_with_properties" value="CREATE DATABASE lusiadas WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_schema_with_properties" value="CREATE SCHEMA lusiadas WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_database_with_single_property" value="CREATE DATABASE lusiadas WITH DBPROPERTIES ('create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_schema_with_single_property" value="CREATE SCHEMA lusiadas WITH DBPROPERTIES ('create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_database_if_not_exists_with_properties" value="CREATE DATABASE IF NOT EXISTS lusiadas WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_schema_if_not_exists_with_properties" value="CREATE SCHEMA IF NOT EXISTS lusiadas WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_database_with_comment_location" value="CREATE DATABASE lusiadas COMMENT 'Hive test database' LOCATION '/lusiadas.db/external';" db-types="Hive" />
+ <sql-case id="create_schema_with_comment_location" value="CREATE SCHEMA lusiadas COMMENT 'Hive test schema' LOCATION '/lusiadas.db/external';" db-types="Hive" />
+ <sql-case id="create_database_with_comment_managedlocation" value="CREATE DATABASE lusiadas COMMENT 'Hive test database' MANAGEDLOCATION '/lusiadas.db';" db-types="Hive" />
+ <sql-case id="create_schema_with_comment_managedlocation" value="CREATE SCHEMA lusiadas COMMENT 'Hive test schema' MANAGEDLOCATION '/lusiadas.db';" db-types="Hive" />
+ <sql-case id="create_database_with_comment_properties" value="CREATE DATABASE lusiadas COMMENT 'Hive test database' WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_schema_with_comment_properties" value="CREATE SCHEMA lusiadas COMMENT 'Hive test schema' WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_database_with_location_managedlocation" value="CREATE DATABASE lusiadas LOCATION '/lusiadas.db/external' MANAGEDLOCATION '/lusiadas.db/managed';" db-types="Hive" />
+ <sql-case id="create_schema_with_location_managedlocation" value="CREATE SCHEMA lusiadas LOCATION '/lusiadas.db/external' MANAGEDLOCATION '/lusiadas.db/managed';" db-types="Hive" />
+ <sql-case id="create_database_with_location_properties" value="CREATE DATABASE lusiadas LOCATION '/lusiadas.db/external' WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_schema_with_location_properties" value="CREATE SCHEMA lusiadas LOCATION '/lusiadas.db/external' WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_database_with_managedlocation_properties" value="CREATE DATABASE lusiadas MANAGEDLOCATION '/lusiadas.db' WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_schema_with_managedlocation_properties" value="CREATE SCHEMA lusiadas MANAGEDLOCATION '/lusiadas.db' WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_database_with_location_managedlocation_properties" value="CREATE DATABASE lusiadas LOCATION '/lusiadas.db/external' MANAGEDLOCATION '/lusiadas.db/managed' WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_schema_with_location_managedlocation_properties" value="CREATE SCHEMA lusiadas LOCATION '/lusiadas.db/external' MANAGEDLOCATION '/lusiadas.db/managed' WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_database_with_comment_location_managedlocation" value="CREATE DATABASE lusiadas COMMENT 'Hive test database' LOCATION '/lusiadas.db/external' MANAGEDLOCATION '/lusiadas.db/managed';" db-types="Hive" />
+ <sql-case id="create_schema_with_comment_location_managedlocation" value="CREATE SCHEMA lusiadas COMMENT 'Hive test schema' LOCATION '/lusiadas.db/external' MANAGEDLOCATION '/lusiadas.db/managed';" db-types="Hive" />
+ <sql-case id="create_database_with_comment_managedlocation_properties" value="CREATE DATABASE lusiadas COMMENT 'Hive test database' MANAGEDLOCATION '/lusiadas.db' WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_schema_with_comment_managedlocation_properties" value="CREATE SCHEMA lusiadas COMMENT 'Hive test schema' MANAGEDLOCATION '/lusiadas.db' WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_database_with_all_options" value="CREATE DATABASE lusiadas COMMENT 'Hive test database' LOCATION '/lusiadas.db/external' MANAGEDLOCATION '/lusiadas.db/managed' WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_schema_with_all_options" value="CREATE SCHEMA lusiadas COMMENT 'Hive test schema' LOCATION '/lusiadas.db/external' MANAGEDLOCATION '/lusiadas.db/managed' WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_remote_database_with_comment_managedlocation" value="CREATE REMOTE DATABASE lusiadas COMMENT 'Remote test database' MANAGEDLOCATION '/lusiadas.db';" db-types="Hive" />
+ <sql-case id="create_remote_schema_with_comment_managedlocation" value="CREATE REMOTE SCHEMA lusiadas COMMENT 'Remote test schema' MANAGEDLOCATION '/lusiadas.db';" db-types="Hive" />
+ <sql-case id="create_remote_database_with_location_managedlocation" value="CREATE REMOTE DATABASE lusiadas LOCATION '/lusiadas.db/external' MANAGEDLOCATION '/lusiadas.db/managed';" db-types="Hive" />
+ <sql-case id="create_remote_schema_with_location_managedlocation" value="CREATE REMOTE SCHEMA lusiadas LOCATION '/lusiadas.db/external' MANAGEDLOCATION '/lusiadas.db/managed';" db-types="Hive" />
+ <sql-case id="create_remote_database_with_managedlocation_properties" value="CREATE REMOTE DATABASE lusiadas MANAGEDLOCATION '/lusiadas.db' WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_remote_schema_with_managedlocation_properties" value="CREATE REMOTE SCHEMA lusiadas MANAGEDLOCATION '/lusiadas.db' WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_remote_database_with_comment_location" value="CREATE REMOTE DATABASE lusiadas COMMENT 'Remote test database' LOCATION '/lusiadas.db/external';" db-types="Hive" />
+ <sql-case id="create_remote_schema_with_comment_location" value="CREATE REMOTE SCHEMA lusiadas COMMENT 'Remote test schema' LOCATION '/lusiadas.db/external';" db-types="Hive" />
+ <sql-case id="create_remote_database_with_comment_properties" value="CREATE REMOTE DATABASE lusiadas COMMENT 'Remote test database' WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_remote_schema_with_comment_properties" value="CREATE REMOTE SCHEMA lusiadas COMMENT 'Remote test schema' WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_remote_database_with_location_properties" value="CREATE REMOTE DATABASE lusiadas LOCATION '/lusiadas.db/external' WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_remote_schema_with_location_properties" value="CREATE REMOTE SCHEMA lusiadas LOCATION '/lusiadas.db/external' WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_remote_database_with_comment_location_managedlocation" value="CREATE REMOTE DATABASE lusiadas COMMENT 'Remote test database' LOCATION '/lusiadas.db/external' MANAGEDLOCATION '/lusiadas.db/managed';" db-types="Hive" />
+ <sql-case id="create_remote_schema_with_comment_location_managedlocation" value="CREATE REMOTE SCHEMA lusiadas COMMENT 'Remote test schema' LOCATION '/lusiadas.db/external' MANAGEDLOCATION '/lusiadas.db/managed';" db-types="Hive" />
+ <sql-case id="create_remote_database_with_comment_managedlocation_properties" value="CREATE REMOTE DATABASE lusiadas COMMENT 'Remote test database' MANAGEDLOCATION '/lusiadas.db' WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_remote_schema_with_comment_managedlocation_properties" value="CREATE REMOTE SCHEMA lusiadas COMMENT 'Remote test schema' MANAGEDLOCATION '/lusiadas.db' WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_remote_database_with_location_managedlocation_properties" value="CREATE REMOTE DATABASE lusiadas LOCATION '/lusiadas.db/external' MANAGEDLOCATION '/lusiadas.db/managed' WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_remote_schema_with_location_managedlocation_properties" value="CREATE REMOTE SCHEMA lusiadas LOCATION '/lusiadas.db/external' MANAGEDLOCATION '/lusiadas.db/managed' WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_remote_database_with_all_options" value="CREATE REMOTE DATABASE lusiadas COMMENT 'Remote test database' LOCATION '/lusiadas.db/external' MANAGEDLOCATION '/lusiadas.db/managed' WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
+ <sql-case id="create_remote_schema_with_all_options" value="CREATE REMOTE SCHEMA lusiadas COMMENT 'Remote test schema' LOCATION '/lusiadas.db/external' MANAGEDLOCATION '/lusiadas.db/managed' WITH DBPROPERTIES ('creator'='Claire', 'create_date'='2025-07-09');" db-types="Hive" />
</sql-cases>