cloud-fan commented on a change in pull request #31107:
URL: https://github.com/apache/spark/pull/31107#discussion_r557860923



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala
##########
@@ -238,7 +238,7 @@ case class DropTableCommand(
     if (isTempView || catalog.tableExists(tableName)) {
       try {
         sparkSession.sharedState.cacheManager.uncacheQuery(
-          sparkSession.table(tableName), cascade = !isTempView)
+          sparkSession.table(tableName), cascade = !(isTempView && 
conf.storeAnalyzedPlanForView))

Review comment:
       I think we should not look at the current config value, but look at how 
the temp view was created. It's possible that a temp view was created with the 
SQL text stored, and then the config is turned on.




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