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/02/03 03:13:11 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #27391: [SPARK-30612][SQL] Resolve qualified column name with v2 tables

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:
users@infra.apache.org


With regards,
Apache Git Services

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