From ec2fd57ce77d386e1eed0b7855ef6b16fef691ac Mon Sep 17 00:00:00 2001 From: Carl Chang <47471390+ichuniq@users.noreply.github.com> Date: Tue, 5 Mar 2024 04:28:14 -0800 Subject: [PATCH] [#2424] test(spark-connector): make all Spark SQL keywords uppercase for consistency (#2437) ### What changes were proposed in this pull request? Make all Spark SQL keywords used in spark connector integration test uppercase ### Why are the changes needed? Fix: #2424 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? `./gradlew build -PskipTests` --- .../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")); } }