bowenliang123 commented on code in PR #5225:
URL: https://github.com/apache/kyuubi/pull/5225#discussion_r1312457565
##########
extensions/spark/kyuubi-spark-connector-hive/src/test/scala/org/apache/kyuubi/spark/connector/hive/command/DropNamespaceSuite.scala:
##########
@@ -70,10 +71,15 @@ trait DropNamespaceSuiteBase extends DDLCommandTestUtils {
checkNamespace(Seq(namespace) ++ builtinNamespace)
// $catalog.ns.table is present, thus $catalog.ns cannot be dropped.
- val e = intercept[IllegalStateException] {
+ val e = intercept[AnalysisException] {
sql(s"DROP NAMESPACE $catalogName.$namespace")
}
- assert(e.getMessage.contains(s"Namespace $namespace is not empty"))
+ if (SPARK_RUNTIME_VERSION >= "3.4") {
+ assert(e.getMessage().contains(
+ s"[SCHEMA_NOT_EMPTY] Cannot drop a schema `$namespace` because it
contains objects"))
+ } else {
+ assert(e.getMessage().contains("Use CASCADE option to drop a non-empty
database"))
+ }
Review Comment:
LGTM. I think it's ready to merge.
--
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]