Skip to content

Conversation

@shivusondur
Copy link
Contributor

@shivusondur shivusondur commented Aug 21, 2019

What changes were proposed in this pull request?

Added doc for DROP TABLE and DROP VIEW sql command

Why are the changes needed?

For reference DROP TABLE or DROP VIEW in spark-sql

Does this PR introduce any user-facing change?

It updates DROP TABLE or DROP VIEW reference doc

How was this patch tested?

Attached the Snap

DROP TABLE

image
image

DROP VIEW
image
image

@dilipbiswal
Copy link
Contributor

@shivusondur Could you please attach the screenshot of the page to make it easier for reviewers ?

@dilipbiswal
Copy link
Contributor

dilipbiswal commented Aug 29, 2019

@shivusondur A few related DOC PRs were merged by @gatorsmile
#25525
#25523

Could you please make changes by following the format of these PRs ? A few things to note:

  1. Formatting of the parameters under dl tag now.
  2. Examples should contain output. Please refer to the INSERT PR for examples.
  3. Add some related statements - statements users are likely to visit. For example after a drop users may want to do a show tables to check the catalog or be interested in some other view commands.
  4. After making the change, kindly put the updated screenshots in the PR description so it saves comitters some time :-)

@shivusondur
Copy link
Contributor Author

shivusondur commented Sep 2, 2019

@dilipbiswal @srowen @gatorsmile
Updated the PR according to #25525 and #25523 PR's.
Updated the ScreenShot after creating the document from Jekyll build

Please review and kindly check for merging.

### Description

Deletes the table and removes the directory associated with this table from the file system
if this is not `EXTERNAL` table. If the table is not present it 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.

Nit: an exception

Deletes the table and removes the directory associated with this table from the file system
if this is not `EXTERNAL` table. If the table is not present it throws exception.

In case of External table it only deletes the metadata from metastore database and it will not remove the directory
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: In case of External table, only the associated metadata information are removed from the metastore database.

</dd>
<dt><code><em>database_name</em></code></dt>
<dd>
Database name where table is present.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Specifies the database name where table is present.

</dd>
<dt><code><em>table_name</em></code></dt>
<dd>
table name to be dropped.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Ditto.


**This page is under construction**
### Description
Drops the specified `VIEW`, which was created by `CREATE VIEW` statement. `DROP VIEW` only involves
Copy link
Contributor

Choose a reason for hiding this comment

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

How about the following ?
DROP VIEW` removes the metadata associated with a specified view from the catalog.

</dd>
<dt><code><em>database_name</em></code></dt>
<dd>
Database name where view is present.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add "Specifies"

Handled PR according to apache#25523 PR which is already merged.
to make uniform accross all docs
@shivusondur
Copy link
Contributor Author

@dilipbiswal
Thanks for your time.
i handled all the comments and updated the screen shot.
Please check

@gatorsmile
Copy link
Member

ok to test

@SparkQA
Copy link

SparkQA commented Sep 20, 2019

Test build #111093 has finished for PR 25533 at commit 194a0b0.

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

Deletes the table and removes the directory associated with this table from the file system
if this is not `EXTERNAL` table. If the table is not present it throws an exception.

In case of External table, only the associated metadata information are removed from the metastore database.
Copy link
Member

Choose a reason for hiding this comment

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

of an external table


### Example
{% highlight sql %}
-- Assumes a view name `employeeView` exist.
Copy link
Member

Choose a reason for hiding this comment

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

exists

@shivusondur
Copy link
Contributor Author

@srowen
Handled your comments, please check

@SparkQA
Copy link

SparkQA commented Oct 29, 2019

Test build #112863 has finished for PR 25533 at commit df23c95.

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

Copy link
Member

@srowen srowen left a comment

Choose a reason for hiding this comment

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

Looking fine, just a few more nits

@shivusondur
Copy link
Contributor Author

@srowen
Thanks for reviewing.
I handled your comments.

@SparkQA
Copy link

SparkQA commented Oct 30, 2019

Test build #112950 has finished for PR 25533 at commit 2ca9a6e.

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

@shivusondur shivusondur requested a review from srowen November 4, 2019 17:18
@srowen srowen closed this in f29a979 Nov 4, 2019
@srowen
Copy link
Member

srowen commented Nov 4, 2019

Merged to master

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.

6 participants