cloud-fan commented on a change in pull request #26923: [SPARK-30284][SQL] 
CREATE VIEW should keep the current catalog and namespace
URL: https://github.com/apache/spark/pull/26923#discussion_r362374639
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
 ##########
 @@ -735,7 +747,7 @@ class Analyzer(
     }
 
     def lookupTempView(identifier: Seq[String]): Option[LogicalPlan] =
-      identifier match {
+      expandRelationName(identifier) match {
 
 Review comment:
   This is to make sure we don't resolve to temp view mistakenly. Imagine that 
a view refers to a table `t`, and there happens to have a temp view `t`, we 
shouldn't resolve `t` to temp view when analyzing this view.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to