sunchao commented on a change in pull request #31107:
URL: https://github.com/apache/spark/pull/31107#discussion_r559941057
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala
##########
@@ -237,8 +237,10 @@ case class DropTableCommand(
if (isTempView || catalog.tableExists(tableName)) {
try {
+ val hasViewText = isTempView &&
+
catalog.getTempViewOrPermanentTableMetadata(tableName).viewText.isDefined
sparkSession.sharedState.cacheManager.uncacheQuery(
- sparkSession.table(tableName), cascade = !isTempView)
+ sparkSession.table(tableName), cascade = !isTempView || hasViewText)
Review comment:
Hmm, I think all dropping temp views are handled by v1
`DropTableCommand` and v2 only handles tables, is that correct?
----------------------------------------------------------------
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]