Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-28813][DOC][SQL] Document SHOW CREATE TABLE in SQL Reference #25885

Closed
wants to merge 4 commits into from

Conversation

huaxingao
Copy link
Contributor

@huaxingao huaxingao commented Sep 21, 2019

What changes were proposed in this pull request?

Document SHOW CREATE TABLE statement in SQL Reference

Why are the changes needed?

To complete the SQL reference.

Does this PR introduce any user-facing change?

Yes.

after the change:

image

How was this patch tested?

Tested using jykyll build --serve

@huaxingao
Copy link
Contributor Author

@dilipbiswal @gatorsmile
One more to review. Thanks!

@SparkQA
Copy link

SparkQA commented Sep 21, 2019

Test build #111126 has finished for PR 25885 at commit 1950b11.

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

@@ -19,4 +19,39 @@ license: |
limitations under the License.
---

**This page is under construction**
### Description
`SHOW CREATE TABLE` returns the `CREATE TABLE` statement that creates a given table. `SHOW CREATE TABLE` on a non-existent table throws Exception.
Copy link
Contributor

Choose a reason for hiding this comment

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

@huaxingao Should we show the "CREATE TABLE" as a link here ? Also how about :
SHOW CREATE TABLE returns the [CREATE TABLE LINK] that was used create a given table ?

@@ -19,4 +19,39 @@ license: |
limitations under the License.
---

**This page is under construction**
### Description
`SHOW CREATE TABLE` returns the `CREATE TABLE` statement that creates a given table. `SHOW CREATE TABLE` on a non-existent table throws Exception.
Copy link
Contributor

Choose a reason for hiding this comment

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

@huaxingao Does this work on a view ? If so, can we spell it out as such ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this works on a view. I will add it.


### Examples
{% highlight sql %}
CREATE TABLE test (c INT);
Copy link
Contributor

Choose a reason for hiding this comment

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

@huaxingao Actually i don't feel strongly about it. So you can safely ignore this comment. I was thinking if we should have this DDL with explicit, row format serde, storage properties .. so that there is less gap between input and output. What do you think ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will change my example.

@SparkQA
Copy link

SparkQA commented Sep 22, 2019

Test build #111173 has finished for PR 25885 at commit d9f44df.

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

@dongjoon-hyun
Copy link
Member

Hi, @huaxingao . Thank you for making PRs always. Since you are not a new commer, I'd like to recommend you to use a proper PR title SPARK-XXX instead of spark-XXX. I believe you already read the contribution guide and try to follow the rules in there.

@huaxingao huaxingao changed the title [spark-28813][DOC][SQL] Document SHOW CREATE TABLE in SQL Reference [SPARK-28813][DOC][SQL] Document SHOW CREATE TABLE in SQL Reference Sep 23, 2019
@huaxingao
Copy link
Contributor Author

Sorry, I will be more careful next time. @dongjoon-hyun

@SparkQA
Copy link

SparkQA commented Sep 24, 2019

Test build #111305 has finished for PR 25885 at commit 7320c58.

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

@dilipbiswal
Copy link
Contributor

LGTM
cc @gatorsmile

@@ -19,4 +19,46 @@ license: |
limitations under the License.
---

**This page is under construction**
### Description
`SHOW CREATE TABLE` returns the [CREATE TABLE statement](sql-ref-syntax-ddl-create-table.html) or [CREATE VIEW statement](sql-ref-syntax-ddl-create-view.html) that was used to create a given table or view. `SHOW CREATE TABLE` on a non-existent table or a temporary view throws Exception.
Copy link
Member

Choose a reason for hiding this comment

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

throws Exception -> throws an exception

@SparkQA
Copy link

SparkQA commented Oct 4, 2019

Test build #111785 has finished for PR 25885 at commit e12cd4f.

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

@srowen srowen closed this in 228b1ea Oct 4, 2019
@srowen
Copy link
Member

srowen commented Oct 4, 2019

Merged to master

@huaxingao
Copy link
Contributor Author

Thanks! @srowen @dilipbiswal

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

Successfully merging this pull request may close these issues.

5 participants