anchovYu commented on code in PR #44328:
URL: https://github.com/apache/spark/pull/44328#discussion_r1425886427


##########
sql/core/src/main/scala/org/apache/spark/sql/internal/CatalogImpl.scala:
##########
@@ -100,7 +109,9 @@ class CatalogImpl(sparkSession: SparkSession) extends 
Catalog {
       case ShowNamespaces(r: ResolvedNamespace, _, _) => r.catalog
     }.get
     val databases = qe.toRdd.collect().map { row =>
-      makeDatabase(Some(catalog.name()), row.getString(0))
+      // dbName can either be a quoted identifier (single or multi part) or an 
unquoted single part
+      val dbName = row.getString(0)
+      makeDatabase(Some(catalog.name()), dbName)

Review Comment:
   Yes, but it's easier to reference in the comment (`dbName` instead of 
something like "returned results" or `row.getString(0)`.



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