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