imback82 commented on a change in pull request #29880:
URL: https://github.com/apache/spark/pull/29880#discussion_r502014771
##########
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:
> is it possible that the column name is qualified like
`catalog_name.ns1.tbl1.col`? Does Hive support qualified column names in
`DESCRIBE`?
@cloud-fan actually I didn't respond to your first question. Yes, Spark
allows qualifying the column name (same in 2.4):
```
scala> sql("CREATE TABLE t (id bigint) USING csv")
scala> sql("describe t spark_catalog.default.t.id").show
+---------+----------+
|info_name|info_value|
+---------+----------+
| col_name| id|
|data_type| bigint|
| comment| NULL|
+---------+----------+
```
, whereas Hive does not support. I guess we cannot change the behavior at
this point?
----------------------------------------------------------------
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]