cloud-fan commented on a change in pull request #31107:
URL: https://github.com/apache/spark/pull/31107#discussion_r559365097
##########
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:
how about the v2 drop table command?
----------------------------------------------------------------
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]