dongjoon-hyun commented on a change in pull request #24427: [SPARK-27531][SQL]
Improve `EXPLAIN DESC TABLE` to show the input parameters of the command.
URL: https://github.com/apache/spark/pull/24427#discussion_r277175228
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala
##########
@@ -318,25 +318,15 @@ class SparkSqlAstBuilder(conf: SQLConf) extends
AstBuilder(conf) {
val statement = plan(ctx.statement)
if (statement == null) {
null // This is enough since ParseException will raise later.
- } else if (isExplainableStatement(statement)) {
+ } else {
ExplainCommand(
logicalPlan = statement,
extended = ctx.EXTENDED != null,
codegen = ctx.CODEGEN != null,
cost = ctx.COST != null)
- } else {
- ExplainCommand(OneRowRelation())
}
}
- /**
- * Determine if a plan should be explained at all.
- */
- protected def isExplainableStatement(plan: LogicalPlan): Boolean = plan
match {
- case _: DescribeTableCommand => false
Review comment:
Hi, @hvanhovell .
This was introduced at Spark 2.0.0 by SPARK-13713 . Can we remove this at
3.0.0?
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]