imback82 commented on a change in pull request #29880:
URL: https://github.com/apache/spark/pull/29880#discussion_r499065054
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2Commands.scala
##########
@@ -315,6 +315,17 @@ case class DescribeRelation(
override def output: Seq[Attribute] =
DescribeTableSchema.describeTableAttributes()
}
+/**
+ * The logical plan of the DESCRIBE relation_name col_name command that works
for v2 tables.
+ */
+case class DescribeColumn(
+ relation: LogicalPlan,
+ colNameParts: Seq[String],
Review comment:
> A simple idea is to put an `UnresolvedAttribute` here, and analyzer
can do the work for us.
Since we need to have the relation resolved first, we need to match like the
following in the analyzer:
```scala
case DescribeColumn(r: ResolvedTable, u: UnresolvedAttribute, _) =>
...
```
Is that what you had in mind?
----------------------------------------------------------------
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]