cloud-fan commented on a change in pull request #30211:
URL: https://github.com/apache/spark/pull/30211#discussion_r519616031
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DropTableExec.scala
##########
@@ -26,13 +27,16 @@ import org.apache.spark.sql.connector.catalog.{Identifier,
TableCatalog}
* Physical plan node for dropping a table.
*/
case class DropTableExec(
+ session: SparkSession,
catalog: TableCatalog,
ident: Identifier,
ifExists: Boolean,
purge: Boolean) extends V2CommandExec {
override def run(): Seq[InternalRow] = {
if (catalog.tableExists(ident)) {
+ val table = catalog.loadTable(ident)
+ session.sharedState.cacheManager.uncacheV2Table(table)
Review comment:
or more efficiently
```
val relation = DataSourceV2Relation.create(table, Some(catalog), Some(ident))
session.sharedState.cacheManager.uncacheQuery(relation, cascade = true)
```
I don't think we can cache the streaming table.
----------------------------------------------------------------
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]