You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "planga82 (via GitHub)" <gi...@apache.org> on 2023/09/05 20:04:50 UTC

[GitHub] [spark] planga82 commented on a diff in pull request #42759: [SPARK-45039][SQL] Include full identifier in Storage tab

planga82 commented on code in PR #42759:
URL: https://github.com/apache/spark/pull/42759#discussion_r1316342993


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/CacheManager.scala:
##########
@@ -117,12 +117,20 @@ class CacheManager extends Logging with AdaptiveSparkPlanHelper {
       logWarning("Asked to cache already cached data.")
     } else {
       val sessionWithConfigsOff = getOrCloneSessionWithConfigsOff(spark)
+      val completeTableName = tableName.map { table =>
+        import spark.sessionState.analyzer.CatalogAndIdentifier
+        spark.sessionState.sqlParser.parseMultipartIdentifier(table) match {
+          case Seq(_) if spark.catalog.getTable(table).isTemporary => table
+
+          case CatalogAndIdentifier(cat, ident) => s"${cat.name()}.${ident.toString}"

Review Comment:
   makes sense, I will make the changes, thank you!



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