cloud-fan commented on a change in pull request #27391: [SPARK-30612][SQL] 
Resolve qualified column name with v2 tables
URL: https://github.com/apache/spark/pull/27391#discussion_r373907892
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
 ##########
 @@ -886,7 +889,13 @@ class Analyzer(
         }
 
       case u: UnresolvedRelation =>
-        lookupRelation(u.multipartIdentifier).map(resolveViews).getOrElse(u)
+        lookupRelation(u.multipartIdentifier)
+          .map {
+            case r: DataSourceV2Relation => 
SubqueryAlias(u.multipartIdentifier, r)
 
 Review comment:
   seems better to add `SubqueryAlias` in `lookupRelation`, to be consistent 
with v1 relation.

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