File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
sql/core/src/main/scala/org/apache/spark/sql/internal Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -418,6 +418,11 @@ class CatalogImpl(sparkSession: SparkSession) extends Catalog {
418418
419419 private def uncacheView (viewDef : LogicalPlan ): Unit = {
420420 try {
421+ // If view text is defined, it means we are not storing analyzed logical plan for the view
422+ // and instead its behavior follows that of a permanent view (see SPARK-33142 for more
423+ // details). Therefore, when uncaching the view we should also do in a cascade fashion, the
424+ // same way as how a permanent view is handled. This also avoids a potential issue where a
425+ // dependent view becomes invalid because of the above while its data is still cached.
421426 val viewText = viewDef match {
422427 case v : View => v.desc.viewText
423428 case _ => None
You can’t perform that action at this time.
0 commit comments