imback82 commented on a change in pull request #30774:
URL: https://github.com/apache/spark/pull/30774#discussion_r543026892



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala
##########
@@ -195,16 +195,21 @@ case class AlterTableRenameCommand(
       DDLUtils.verifyAlterTableType(catalog, table, isView)
       // If an exception is thrown here we can just assume the table is 
uncached;
       // this can happen with Hive tables when the underlying catalog is 
in-memory.
-      val wasCached = 
Try(sparkSession.catalog.isCached(oldName.unquotedString)).getOrElse(false)

Review comment:
       The existing implementation uses `Catalog` APIs (`isCached`), whereas 
this PR uses `CacheManager` directly. If this approach is not desired, we can 
update `Catalog` API to expose `StorageLevel`.




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

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