imback82 commented on a change in pull request #30743:
URL: https://github.com/apache/spark/pull/30743#discussion_r543890540
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/CacheTableExec.scala
##########
@@ -87,3 +87,16 @@ case class CacheTableAsSelectExec(
sparkSession.table(tempViewName)
}
}
+
+case class UncacheTableExec(
+ relation: LogicalPlan,
+ cascade: Boolean) extends V2CommandExec {
+ override def run(): Seq[InternalRow] = {
+ val sparkSession = sqlContext.sparkSession
+ val df = Dataset.ofRows(sparkSession, relation)
+ sparkSession.sharedState.cacheManager.uncacheQuery(df, cascade)
Review comment:
I updated to pass a logical plan instead of dataframe (this required
updating more rules, but I think it's "more correct".)
I will add a new overload that takes `LogicalPlan` in a separate PR.
----------------------------------------------------------------
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]