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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]