cloud-fan commented on a change in pull request #31273:
URL: https://github.com/apache/spark/pull/31273#discussion_r580816822
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/command/views.scala
##########
@@ -192,6 +192,17 @@ case class CreateViewCommand(
Seq.empty[Row]
}
+ /**
+ * Checks if the temp view (the result of getTempViewRawPlan or
getRawGlobalTempView) is storing
+ * the same plan as the given aliased plan.
+ */
+ private def isSamePlan(
+ rawTempView: Option[LogicalPlan],
+ aliasedPlan: LogicalPlan): Boolean = rawTempView match {
+ case Some(TemporaryViewRelation(_, Some(p))) => p.sameResult(aliasedPlan)
Review comment:
It's possible that `rawTempView` is not `TemporaryViewRelation`, shall
we add
```
...
case Some(p) => p.sameResult(aliasedPlan)
```
----------------------------------------------------------------
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]