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



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -1675,6 +1675,13 @@ class Analyzer(override val catalogManager: 
CatalogManager)
       // Skip the having clause here, this will be handled in 
ResolveAggregateFunctions.
       case h: UnresolvedHaving => h
 
+      case d @ DescribeColumn(rt: ResolvedTable, _, _) =>
+        rt.table match {
+          // References for v1 tables are resolved in DescribeColumnCommand.
+          case _: V1Table => d

Review comment:
       Shall we change the v1 command to take resolved `Attribute` directly?  
Then we don't need the hack here.
   
   This also reminds me that, for all v1 commands, we will lookup the table 
twice: once in the framework, and once inside the v1 command. This is kind of a 
perf regression: previously we simply lookup the catalog and fallback to v1 
command if it's the session catalog, so the table lookup still happens once 
inside the v1 command. We can also update the v1 command and take the resolved 
table directly.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to