Skip to content

[SPARK-27531][SQL] Improve EXPLAIN DESC TABLE to show the input parameters of the command.#24427

Closed
dilipbiswal wants to merge 1 commit intoapache:masterfrom
dilipbiswal:describe_table_explain2
Closed

[SPARK-27531][SQL] Improve EXPLAIN DESC TABLE to show the input parameters of the command.#24427
dilipbiswal wants to merge 1 commit intoapache:masterfrom
dilipbiswal:describe_table_explain2

Conversation

@dilipbiswal
Copy link
Contributor

@dilipbiswal dilipbiswal commented Apr 20, 2019

What changes were proposed in this pull request?

Currently "EXPLAIN DESC TABLE" is special cased and outputs a single row relation as following.
Current output:

spark-sql> EXPLAIN DESCRIBE TABLE t;
== Physical Plan ==
*(1) Scan OneRowRelation[]

This is not consistent with how we handle explain processing for other commands. In this PR, the inconsistency is handled by removing the special handling for "describe table".

After change:

spark-sql> EXPLAIN DESC EXTENDED t
== Physical Plan ==
Execute DescribeTableCommand
   +- DescribeTableCommand `t`, true

How was this patch tested?

Added new tests in SQLQueryTestSuite.

@dilipbiswal dilipbiswal changed the title [SPARK-27531] Improve explain output of describe table command to show the inputs to the command. [SPARK-27531] Improve EXPLAIN DESC TABLE to show the input parameters of the command. Apr 20, 2019
@SparkQA
Copy link

SparkQA commented Apr 21, 2019

Test build #104780 has finished for PR 24427 at commit 88aab62.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-27531] Improve EXPLAIN DESC TABLE to show the input parameters of the command. [SPARK-27531][SQL] Improve EXPLAIN DESC TABLE to show the input parameters of the command. Apr 21, 2019
* Determine if a plan should be explained at all.
*/
protected def isExplainableStatement(plan: LogicalPlan): Boolean = plan match {
case _: DescribeTableCommand => false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @hvanhovell .
This was introduced at Spark 2.0.0 by SPARK-13713 . Can we remove this at 3.0.0?

@dongjoon-hyun
Copy link
Member

Retest this please.

@SparkQA
Copy link

SparkQA commented Apr 22, 2019

Test build #104811 has finished for PR 24427 at commit 88aab62.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM. Merged to master.
Thank you, @dilipbiswal .

@dilipbiswal
Copy link
Contributor Author

Thanks a LOT @dongjoon-hyun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants