cloud-fan commented on a change in pull request #27187: [SPARK-30497][SQL]  
migrate DESCRIBE TABLE to the new framework
URL: https://github.com/apache/spark/pull/27187#discussion_r366233609
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
 ##########
 @@ -900,6 +902,18 @@ class Analyzer(
             }
           case _ => u
         }
+
+      case u @ UnresolvedTableOrView(identifier) =>
+        expandRelationName(identifier) match {
+          case SessionCatalogAndIdentifier(catalog, ident) =>
+            CatalogV2Util.loadTable(catalog, ident) match {
+              // We don't support view in v2 catalog yet. Here we treat v1 
view as table and use
+              // `ResolvedTable` to carry it.
+              case Some(table) => ResolvedTable(catalog.asTableCatalog, ident, 
table)
 
 Review comment:
   good point. Adding a case is clearer.

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