From e00f7e57b3c9094e7e81f8c2df5d1fda6fb704bc Mon Sep 17 00:00:00 2001 From: ichuniq Date: Tue, 5 Mar 2024 01:45:54 -0800 Subject: [PATCH] improvement: make all spark sql keyword uppercase --- .../gravitino/integration/test/spark/SparkIT.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/integration-test/src/test/java/com/datastrato/gravitino/integration/test/spark/SparkIT.java b/integration-test/src/test/java/com/datastrato/gravitino/integration/test/spark/SparkIT.java index b1fb73d1aa5..ed5ea8fbebf 100644 --- a/integration-test/src/test/java/com/datastrato/gravitino/integration/test/spark/SparkIT.java +++ b/integration-test/src/test/java/com/datastrato/gravitino/integration/test/spark/SparkIT.java @@ -21,7 +21,7 @@ public class SparkIT extends SparkEnvIT { @BeforeEach void init() { - sql("use " + hiveCatalogName); + sql("USE " + hiveCatalogName); } @Test @@ -33,7 +33,7 @@ void testLoadCatalogs() { @Test void testCreateAndLoadSchema() { String testDatabaseName = "t_create1"; - sql("create database " + testDatabaseName); + sql("CREATE DATABASE " + testDatabaseName); Map databaseMeta = getDatabaseMetadata(testDatabaseName); Assertions.assertFalse(databaseMeta.containsKey("Comment")); Assertions.assertTrue(databaseMeta.containsKey("Location")); @@ -63,15 +63,15 @@ void testDropSchema() { Set databases = getDatabases(); Assertions.assertFalse(databases.contains(testDatabaseName)); - sql("create database " + testDatabaseName); + sql("CREATE DATABASE " + testDatabaseName); databases = getDatabases(); Assertions.assertTrue(databases.contains(testDatabaseName)); - sql("drop database " + testDatabaseName); + sql("DROP DATABASE " + testDatabaseName); databases = getDatabases(); Assertions.assertFalse(databases.contains(testDatabaseName)); Assertions.assertThrowsExactly( - NoSuchNamespaceException.class, () -> sql("drop database notExists")); + NoSuchNamespaceException.class, () -> sql("DROP DATABASE notExists")); } }