Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/16422#discussion_r122347812
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala ---
@@ -306,10 +306,15 @@ class SparkSqlAstBuilder(conf: SQLConf) extends
AstBuilder(conf) {
* Create a [[DescribeTableCommand]] logical plan.
*/
override def visitDescribeTable(ctx: DescribeTableContext): LogicalPlan
= withOrigin(ctx) {
- // Describe column are not supported yet. Return null and let the
parser decide
- // what to do with this (create an exception or pass it on to a
different system).
if (ctx.describeColName != null) {
- null
+ if (ctx.partitionSpec != null) {
+ throw new ParseException("DESC TABLE COLUMN for a specific
partition is not supported", ctx)
+ } else {
+ DescribeColumnCommand(
+ visitTableIdentifier(ctx.tableIdentifier),
+ ctx.describeColName.getText,
--- End diff --
the column name syntax is:
```
describeColName
: identifier ('.' (identifier | STRING))*
;
```
since we will always have a table name before column name, do we really
need to support qualified column name here?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]