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_r366308625
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -759,6 +759,8 @@ class Analyzer(
u.failAnalysis(s"${ident.quoted} is a temp view not table.")
}
u
+ case u @ UnresolvedTableOrView(ident) =>
+ lookupTempView(ident).getOrElse(u)
Review comment:
I did more investigation, and think we can't reuse `UnresolvedRelation`.
`UnresolvedRelation` means something we want to read/write, so it needs to
resolve the data source, and fail if something goes wrong, e.g. the data source
class can't be loaded.
For DESCRIBE commands, it should work as long as we can get the table. For
example, we may want to use DESCRIBE to debug a table which can't load data
source class.
----------------------------------------------------------------
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]