Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Jun 5, 2017

What changes were proposed in this pull request?

After SPARK-20067, DESCRIBE and DESCRIBE EXTENDED shows the following result. This is incompatible with Spark 2.1.1. This PR removes the column header line in case of those command.

MASTER and BRANCH-2.2

scala> sql("desc t").show(false)
+----------+---------+-------+
|col_name  |data_type|comment|
+----------+---------+-------+
|# col_name|data_type|comment|
|a         |int      |null   |
+----------+---------+-------+

SPARK 2.1.1 and this PR

scala> sql("desc t").show(false)
+--------+---------+-------+
|col_name|data_type|comment|
+--------+---------+-------+
|a       |int      |null   |
+--------+---------+-------+

How was this patch tested?

Pass the Jenkins with the updated test suites.

@SparkQA
Copy link

SparkQA commented Jun 5, 2017

Test build #77734 has started for PR 18203 at commit a0b8b1d.

@dongjoon-hyun
Copy link
Member Author

Retest this please

@SparkQA
Copy link

SparkQA commented Jun 5, 2017

Test build #77735 has finished for PR 18203 at commit a0b8b1d.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jun 5, 2017

Test build #77737 has finished for PR 18203 at commit 02913a5.

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

@dongjoon-hyun
Copy link
Member Author

Hi, @gatorsmile .
Could you review this PR?

@dongjoon-hyun
Copy link
Member Author

Hi, @gatorsmile and @cloud-fan .
Could you review this PR when you have sometime?
This will recover the incompatible changes at Spark 2.2.0.

@cloud-fan
Copy link
Contributor

LGTM, cc @gatorsmile for final sign-off

s"DESC PARTITION is not allowed on a temporary view: ${table.identifier}")
}
describeSchema(catalog.lookupRelation(table).schema, result)
describeSchema(catalog.lookupRelation(table).schema, result, isExtended)
Copy link
Member

Choose a reason for hiding this comment

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

When specifying Extend, we should also remove it too, right? @cloud-fan

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you Right. This PR considered only simple DESC. I'll update 'DESC EXTENDED', too. It is different from DESC FORMATTED as you pointed.

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-20954][SQL] Simple DESCRIBE result should be compatible with previous Spark [SPARK-20954][SQL] DESCRIBE [EXTENDED] result should be compatible with previous Spark Jun 8, 2017
partitionSpec,
ctx.EXTENDED != null || ctx.FORMATTED != null)
ctx.EXTENDED != null,
ctx.FORMATTED != null)
Copy link
Contributor

Choose a reason for hiding this comment

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

we deprecated DESC FORMATTED intentionally, and made DESC EXTENDED behave as DESC FORMATTED. I really don't think users will query the result of DESC EXTENDED before, as all the detail table information is inside one column, so it's probably fine to break this behavior just for display.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, I see. Then, you want remove the header completely for all case. Did I understand correctly?

Copy link
Member Author

Choose a reason for hiding this comment

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

Or, do I simple revert the following two commits after your review?

Copy link
Contributor

Choose a reason for hiding this comment

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

For DESC t, we should change it back to be compatible with before, for DESC EXTENDED, it should be same as DESC FORMATTED, so we don't need to change it.

@SparkQA
Copy link

SparkQA commented Jun 8, 2017

Test build #77812 has finished for PR 18203 at commit 48329a4.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jun 8, 2017

Test build #77813 has finished for PR 18203 at commit 744d166.

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

@dongjoon-hyun
Copy link
Member Author

Oops. I'll ping again. Sorry. I didn't push it.

@SparkQA
Copy link

SparkQA commented Jun 8, 2017

Test build #77819 has finished for PR 18203 at commit 1eb712d.

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

@gatorsmile
Copy link
Member

LGTM

@dongjoon-hyun
Copy link
Member Author

Thank you. Please wait for a run. The last style fix is not tested by Jenkins.

@cloud-fan
Copy link
Contributor

thanks, merging to master! can you send a new PR for 2.2?

@cloud-fan
Copy link
Contributor

oops, I though it has passed tests... Let's see the test result then

@dongjoon-hyun
Copy link
Member Author

Sorry for that. I'll start to prepare a new PR for 2.2.

@asfgit asfgit closed this in 6e95897 Jun 8, 2017
@SparkQA
Copy link

SparkQA commented Jun 9, 2017

Test build #77827 has finished for PR 18203 at commit 5d27020.

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

@dongjoon-hyun
Copy link
Member Author

It passed. Also, a PR for branch-2.2, #18245, passed, too.

@dongjoon-hyun
Copy link
Member Author

Thank you for review and merge both PRs, @gatorsmile and @cloud-fan .

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.

4 participants