spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [spark] LantaoJin commented on a change in pull request #27185: [SPARK-30494][SQL] Avoid duplicated cached RDD when create or replace an existing view
Date Mon, 13 Jan 2020 06:59:43 GMT
LantaoJin commented on a change in pull request #27185: [SPARK-30494][SQL] Avoid duplicated
cached RDD when create or replace an existing view
URL: https://github.com/apache/spark/pull/27185#discussion_r365663674
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/command/views.scala
 ##########
 @@ -125,6 +132,9 @@ case class CreateViewCommand(
         val viewIdent = tableMetadata.identifier
         checkCyclicViewReference(analyzedPlan, Seq(viewIdent), viewIdent)
 
+        // uncache the cached data before replacing an exists view
+        sparkSession.catalog.uncacheTable(viewIdent.quotedString)
 
 Review comment:
   FYI. There is a condition `} else if (replace) {` in line 130.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message