Github user hvanhovell commented on a diff in the pull request:
https://github.com/apache/spark/pull/10723#discussion_r49974415
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkQl.scala ---
@@ -52,26 +57,30 @@ private[sql] class SparkQl(conf: ParserConf =
SimpleParserConf()) extends Cataly
nodeToDescribeFallback(node)
} else {
tableType match {
- case Token("TOK_TABTYPE", Token("TOK_TABNAME", nameParts ::
Nil) :: Nil) =>
+ case Token("TOK_TABTYPE", Token("TOK_TABNAME", nameParts) ::
Nil) =>
--- End diff --
if we parse the following SQL using the parse driver
```org.apache.spark.sql.catalyst.parser.ParseDriver.parsePlan("DESCRIBE
EXTENDED tbl.a", null)```
We would end up with the following AST:
TOK_DESCTABLE 1, 0, 6, 18
:- TOK_TABTYPE 1, 4, 6, 18
: +- TOK_TABNAME 1, 4, 6, 18
: :- tbl 1, 4, 4, 18
: +- a 1, 6, 6, 22
+- EXTENDED 1, 2, 2, 9
This change would pick this up, and old code didn't (I am sure I tested
this though :S ). You can disable this in the DDL parser, to see if it works
now.
---
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]