cloud-fan commented on a change in pull request #27550: [SPARK-30799][SQL]
"spark_catalog.t" should not be resolved to temp view
URL: https://github.com/apache/spark/pull/27550#discussion_r379245392
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
##########
@@ -228,10 +230,12 @@ class ResolveSessionCatalog(
case DescribeColumnStatement(
SessionCatalogAndTable(catalog, tbl), colNameParts, isExtended) =>
loadTable(catalog, tbl.asIdentifier).collect {
+ // `V1Table` also includes permanent views.
case v1Table: V1Table =>
DescribeColumnCommand(tbl.asTableIdentifier, colNameParts,
isExtended)
}.getOrElse {
- if (isView(tbl)) {
+ if (isTempView(tbl)) {
Review comment:
You have a good point here. I think this is an existing bug. Here we look up
table first (call `loadTable`) then look up temp view. We should look up temp
view first to retain the behavior of Spark 2.4. @imback82 can you help fix it
later?
----------------------------------------------------------------
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]