Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#2424] improvement(spark-connector): make all Spark SQL keywords uppercase for consistency #2437

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class SparkIT extends SparkEnvIT {

@BeforeEach
void init() {
sql("use " + hiveCatalogName);
sql("USE " + hiveCatalogName);
}

@Test
Expand All @@ -33,7 +33,7 @@ void testLoadCatalogs() {
@Test
void testCreateAndLoadSchema() {
String testDatabaseName = "t_create1";
sql("create database " + testDatabaseName);
sql("CREATE DATABASE " + testDatabaseName);
Map<String, String> databaseMeta = getDatabaseMetadata(testDatabaseName);
Assertions.assertFalse(databaseMeta.containsKey("Comment"));
Assertions.assertTrue(databaseMeta.containsKey("Location"));
Expand Down Expand Up @@ -63,15 +63,15 @@ void testDropSchema() {
Set<String> 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));

FANNG1 marked this conversation as resolved.
Show resolved Hide resolved
Assertions.assertThrowsExactly(
NoSuchNamespaceException.class, () -> sql("drop database notExists"));
NoSuchNamespaceException.class, () -> sql("DROP DATABASE notExists"));
}
}
Loading