Peng-Lei commented on a change in pull request #33339:
URL: https://github.com/apache/spark/pull/33339#discussion_r697113418



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala
##########
@@ -799,7 +799,7 @@ abstract class DDLSuite extends QueryTest with SQLTestUtils 
{
           }
 
           intercept[NoSuchDatabaseException] {
-            sql(s"ALTER DATABASE `db-not-exist` SET LOCATION 
'${tmpDir.toURI}'")
+            sql(s"ALTER DATABASE `db_not_exist` SET LOCATION 
'${tmpDir.toURI}'")

Review comment:
       - The unresolved logical plan is :
     ```'SetNamespaceLocation 
file:/C:/Users/p00347789/AppData/Local/Temp/spark-c9119ae6-12c3-4393-a4ff-967b4be92de5/
   +- 'UnresolvedNamespace [db-not-exist]```
   - When resolve it by use rule `ResolveNamespace`:
     ```scala
       case class ResolveNamespace(catalogManager: CatalogManager)
       extends Rule[LogicalPlan] with LookupCatalog {
       def apply(plan: LogicalPlan): LogicalPlan = plan resolveOperators {
         ...
         case UnresolvedNamespace(Seq()) =>
           ResolvedNamespace(currentCatalog, Seq.empty[String])
         case UnresolvedNamespace(CatalogAndNamespace(catalog, ns)) =>
           ResolvedNamespace(catalog, ns)
       }
     }
     ```
     it failed.
   




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