amaliujia commented on code in PR #36586:
URL: https://github.com/apache/spark/pull/36586#discussion_r880816481


##########
sql/core/src/main/scala/org/apache/spark/sql/internal/CatalogImpl.scala:
##########
@@ -117,14 +128,42 @@ class CatalogImpl(sparkSession: SparkSession) extends 
Catalog {
       case NonFatal(_) => None
     }
     val isTemp = sessionCatalog.isTempView(tableIdent)
+    val qualifier =
+      
Array(metadata.map(_.identifier.database).getOrElse(tableIdent.database).orNull)

Review Comment:
   ```
   /**
    * Identifies a table in a database.
    * If `database` is not defined, the current database is used.
    * When we register a permanent function in the FunctionRegistry, we use
    * unquotedString as the function name.
    */
   case class TableIdentifier(table: String, database: Option[String])
     extends IdentifierWithDatabase {
   
     override val identifier: String = table
   
     def this(table: String) = this(table, None)
   }
   ```



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to