cloud-fan commented on a change in pull request #31368:
URL: https://github.com/apache/spark/pull/31368#discussion_r565563247



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala
##########
@@ -625,7 +625,8 @@ case class DescribeTableCommand(
         throw new AnalysisException(
           s"DESC PARTITION is not allowed on a temporary view: 
${table.identifier}")
       }
-      describeSchema(catalog.lookupRelation(table).schema, result, header = 
false)
+      val schema = catalog.getTempViewOrPermanentTableMetadata(table).schema

Review comment:
       the view plan can be unresolved (with cast and alias added), we should 
use the recorded view schema.




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



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

Reply via email to