You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/06/30 01:03:39 UTC

[GitHub] [spark] ulysses-you commented on a diff in pull request #37021: [SPARK-39503][SQL] Add session catalog name for v1 database table and function

ulysses-you commented on code in PR #37021:
URL: https://github.com/apache/spark/pull/37021#discussion_r910520404


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/connector/catalog/CatalogV2Implicits.scala:
##########
@@ -132,15 +132,21 @@ private[sql] object CatalogV2Implicits {
 
     def asTableIdentifier: TableIdentifier = ident.namespace match {
       case ns if ns.isEmpty => TableIdentifier(ident.name)
-      case Array(dbName) => TableIdentifier(ident.name, Some(dbName))
+      case Array(dbName) =>
+        val identifier = TableIdentifier(ident.name, Some(dbName))
+        CatalystIdentifier.withSessionCatalog(identifier)

Review Comment:
   checked the database is global temp inside `CatalystIdentifier.withSessionCatalog ` and skip add catalog if is global temp



-- 
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-unsubscribe@spark.apache.org

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


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