viirya commented on a change in pull request #31136:
URL: https://github.com/apache/spark/pull/31136#discussion_r556176955
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/internal/CatalogImpl.scala
##########
@@ -396,8 +396,13 @@ class CatalogImpl(sparkSession: SparkSession) extends
Catalog {
*/
override def dropTempView(viewName: String): Boolean = {
sparkSession.sessionState.catalog.getTempView(viewName).exists { viewDef =>
- sparkSession.sharedState.cacheManager.uncacheQuery(
- sparkSession, viewDef, cascade = false)
+ try {
+ val plan = sparkSession.sessionState.executePlan(viewDef)
+ sparkSession.sharedState.cacheManager.uncacheQuery(
+ sparkSession, plan.analyzed, cascade = false)
+ } catch {
+ case NonFatal(_) => // ignore
Review comment:
If there is table or view not found error, does it mean we skip
uncaching the temp view?
----------------------------------------------------------------
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]