Skip to content

Commit 0a52bdc

Browse files
committed
review comments fixed
1 parent b2ec189 commit 0a52bdc

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ class SessionCatalog(
214214
if (!externalCatalog.databaseExists(dbName) && fs.exists(dbPath)
215215
&& fs.listStatus(dbPath).nonEmpty) {
216216
throw new AnalysisException(
217-
s"Cannot create database at location $dbPath because the path is not empty.")
217+
s"Cannot create database at location $dbPath as the path already exists.")
218218
}
219219
val qualifiedPath = makeQualifiedPath(dbDefinition.locationUri)
220220
externalCatalog.createDatabase(

sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2521,8 +2521,7 @@ class HiveDDLSuite
25212521
val dbName = "dbwithcustomlocation"
25222522
withTempDir { tmpDir =>
25232523
val parentDir = tmpDir.getParent
2524-
val expectedMsg = s"Cannot create database at location $parentDir because the path is not " +
2525-
"empty."
2524+
val expectedMsg = s"Cannot create database at location $parentDir as the path already exists."
25262525
val e = intercept[AnalysisException] {
25272526
sql(s"CREATE DATABASE $dbName Location '$parentDir' ")
25282527
}.getMessage

0 commit comments

Comments
 (0)