imback82 commented on a change in pull request #35113:
URL: https://github.com/apache/spark/pull/35113#discussion_r779313382



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/CreateNamespaceSuite.scala
##########
@@ -36,7 +36,7 @@ import org.apache.spark.sql.execution.command
 trait CreateNamespaceSuiteBase extends command.CreateNamespaceSuiteBase
     with command.TestsV1AndV2Commands {
   override def namespace: String = "db"
-  override def notFoundMsgPrefix: String = "Database"
+  override def notFoundMsgPrefix: String = if (runningV1Command) "Database" 
else "Namespace"

Review comment:
       We need to update the test now that v1 catalogs are run against both v1 
and v2 commands (after adding `if conf.useV1Command`) .

##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
##########
@@ -214,16 +214,11 @@ class ResolveSessionCatalog(val catalogManager: 
CatalogManager)
     case DropView(r: ResolvedView, ifExists) =>
       DropTableCommand(r.identifier.asTableIdentifier, ifExists, isView = 
true, purge = false)
 
-    case c @ CreateNamespace(ResolvedDBObjectName(catalog, name), _, _)
-        if isSessionCatalog(catalog) =>
-      if (name.length != 1) {
-        throw QueryCompilationErrors.invalidDatabaseNameError(name.quoted)
-      }

Review comment:
       This check is handled in `DatabaseNameInSessionCatalog`.




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