cloud-fan commented on code in PR #37021:
URL: https://github.com/apache/spark/pull/37021#discussion_r910209536


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala:
##########
@@ -512,7 +513,9 @@ class SessionCatalog(
     val table = formatTableName(name.table)
     requireDbExists(db)
     requireTableExists(TableIdentifier(table, Some(db)))
-    externalCatalog.getTable(db, table)
+    val catalogTable = externalCatalog.getTable(db, table)
+    CatalystIdentifier.withSessionCatalog(catalogTable.identifier)

Review Comment:
   instead of adding catalog field here, I think we can do it much earlier, in 
`HiveClientImpl`, when we convert Hive tables to `CatalogTable`



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