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



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/cache.scala
##########
@@ -19,26 +19,27 @@ package org.apache.spark.sql.execution.command
 
 import java.util.Locale
 
-import org.apache.spark.sql.{Dataset, Row, SparkSession}
-import org.apache.spark.sql.catalyst.TableIdentifier
+import org.apache.spark.sql.{AnalysisException, DataFrame, Dataset, Row, 
SparkSession}
 import org.apache.spark.sql.catalyst.plans.QueryPlan
 import org.apache.spark.sql.catalyst.plans.logical.{IgnoreCachedData, 
LogicalPlan}
 import org.apache.spark.sql.catalyst.util.CaseInsensitiveMap
+import 
org.apache.spark.sql.connector.catalog.CatalogV2Implicits.MultipartIdentifierHelper
 import org.apache.spark.storage.StorageLevel
 
 case class CacheTableCommand(

Review comment:
       One issue I am encountering by moving to the v2 framework (for v2 
tables) is the following.
   
   When `CACHE TABLE testcat.tbl` is run, `tbl` is changed from 
`DataSourceV2Relation` to `DataSourceV2ScanRelation` in 
`V2ScanRelationPushDown` rule, now that the plan goes thru analyzer, optimizer, 
etc. But, if I run `spark.table("testcat.tbl")`, the query execution has `tbl` 
as `DataSourceV2Relation`, thus cache is not applied.




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