dchvn commented on a change in pull request #35007:
URL: https://github.com/apache/spark/pull/35007#discussion_r774853399



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala
##########
@@ -540,8 +540,14 @@ object QueryCompilationErrors {
       s"rename temporary view from '$oldName' to '$newName': destination view 
already exists")
   }
 
-  def databaseNotEmptyError(db: String, details: String): Throwable = {
-    new AnalysisException(s"Database $db is not empty. One or more $details 
exist.")
+  def cannotDropNonemptyDatabaseError(db: String, details: String): Throwable 
= {
+    new AnalysisException(s"Cannot drop a non-empty database: $db. One or more 
$details exist.")
+  }
+
+  def cannotDropNonemptyNamespaceError(namespace: Seq[String]): Throwable = {
+    new AnalysisException(
+      s"Cannot drop a non-empty namespace: ${namespace.quoted}. " +
+        "Use CASCADE option to drop a non-empty namespace.")

Review comment:
       Move `cannotDropNonemptyNamespaceError` from `QueryExecutionErrors` to 
`QueryCompilationErrors` as 
[SPARK-33539](https://issues.apache.org/jira/browse/SPARK-33539)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to