MaxGekk commented on a change in pull request #30358:
URL: https://github.com/apache/spark/pull/30358#discussion_r522992012



##########
File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/connector/catalog/TableCatalogSuite.scala
##########
@@ -813,9 +813,10 @@ class TableCatalogSuite extends SparkFunSuite {
 
     assert(catalog.namespaceExists(testNs) === false)
 
-    val ret = catalog.dropNamespace(testNs)
-
-    assert(ret === false)
+    val errMsg = intercept[NoSuchNamespaceException] {
+      catalog.dropNamespace(testNs)

Review comment:
       I think that from consistency point of view we should either:
   - return empty array from `listTables()` and false from `dropNamespace()` 
for not existing namespace, or
   - throw `NoSuchNamespaceException` from both `listTables()` and 
`dropNamespace()` if the provided namespace doesn't exist.
   
   otherwise the implementation looks inconsistent. 




----------------------------------------------------------------
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.

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