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


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/connector/catalog/CatalogV2Implicits.scala:
##########
@@ -156,15 +159,17 @@ private[sql] object CatalogV2Implicits {
 
     def asTableIdentifier: TableIdentifier = parts match {
       case Seq(tblName) => TableIdentifier(tblName)
-      case Seq(dbName, tblName) => TableIdentifier(tblName, Some(dbName))
+      case Seq(dbName, tblName) =>
+        TableIdentifier(tblName, Some(dbName), sessionCatalogOption(dbName))

Review Comment:
   it also be used during resolve v2 -> v1 command, e.g. 
`CreateTable#ResolvedDBObjectName`, if its catalog is session catalog, we will 
convert the multipart name to TableIdentifier then to construct v1 CreateTable.



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