You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/12/06 04:41:09 UTC

[GitHub] [spark] imback82 commented on a change in pull request #30608: [SPARK-33663][SQL] Uncaching should not be called on non-existing temp views.

imback82 commented on a change in pull request #30608:
URL: https://github.com/apache/spark/pull/30608#discussion_r536954562



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/command/views.scala
##########
@@ -113,11 +113,11 @@ case class CreateViewCommand(
     verifyTemporaryObjectsNotExists(catalog, isTemporary, name, child)
 
     if (viewType == LocalTempView) {
-      val samePlan = catalog.getTempView(name.table).exists {
+      val samePlan = catalog.getTempView(name.table).map {
         // Don't perform sameResult check for View logical plan, since it's unresolved
         case _: View => false
         case other => other.sameResult(child)
-      }
+      }.getOrElse(true)
       if (replace && !samePlan) {

Review comment:
       This seems better. Thanks @HyukjinKwon!




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



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