cloud-fan commented on a change in pull request #30403:
URL: https://github.com/apache/spark/pull/30403#discussion_r530759172



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/cache.scala
##########
@@ -51,32 +54,35 @@ case class CacheTableCommand(
 
     if (storageLevelValue.nonEmpty) {
       sparkSession.catalog.cacheTable(
-        tableIdent.quotedString, 
StorageLevel.fromString(storageLevelValue.get))
+        tableName, StorageLevel.fromString(storageLevelValue.get))
     } else {
-      sparkSession.catalog.cacheTable(tableIdent.quotedString)
+      sparkSession.catalog.cacheTable(tableName)
     }
 
     if (!isLazy) {
       // Performs eager caching
-      sparkSession.table(tableIdent).count()
+      sparkSession.table(tableName).count()
     }
 
     Seq.empty[Row]
   }
 }
 
-
 case class UncacheTableCommand(
-    tableIdent: TableIdentifier,
+    multipartIdentifier: Seq[String],
     ifExists: Boolean) extends RunnableCommand {
 
   override def run(sparkSession: SparkSession): Seq[Row] = {
-    val tableId = tableIdent.quotedString
-    if (!ifExists || sparkSession.catalog.tableExists(tableId)) {

Review comment:
       We don't need to fix `CatalogImpl` completely in this PR, but the 
related ones should be fixed. For `tableExists`:
   ```
   def tableExists(table: String) = tableExists(parseMultiPartName(table))
   
   def tableExists(db:String, table: String) = tableExists(Seq(db, table))
   
   private def tableExists(name: Seq[String]) ...
   ```




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