brkyvz commented on a change in pull request #26957: [SPARK-30314] Add 
identifier and catalog information to DataSourceV2Relation
URL: https://github.com/apache/spark/pull/26957#discussion_r366589593
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
 ##########
 @@ -809,22 +809,27 @@ class Analyzer(
           .getOrElse(i)
 
       case desc @ DescribeTable(u: UnresolvedV2Relation, _) =>
-        CatalogV2Util.loadRelation(u.catalog, u.tableName)
-            .map(rel => desc.copy(table = rel))
-            .getOrElse(desc)
+        CatalogV2Util
+          .loadRelation(u.catalog, 
catalogManager.catalogIdentifier(u.catalog), u.tableName)
 
 Review comment:
   Would it be easier to have a separate util method for 
`UnresolvedV2Relation`? The interesting thing about `UnresolvedV2Relation` is 
that you have access to the `originalNameParts`. If that doesn't contain the 
catalog identifier, then we shouldn't need to add it to the 
`DataSourceV2Relation`

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


With regards,
Apache Git Services

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

Reply via email to