-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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-28802][DOC][SQL]Document DESCRIBE DATABASE statement in SQL Reference #25528
Conversation
@kevinyu98 Can you please attach a screen-shot of the page ? |
@@ -18,5 +18,23 @@ license: | | |||
See the License for the specific language governing permissions and | |||
limitations under the License. | |||
--- | |||
### Description | |||
| |||
Return the metadata of an existing database(name, comment and location). If the database does not exist, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space after database
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok.
Return the metadata of an existing database(name, comment and location). If the database does not exist, | ||
an exception is thrown. | ||
|
||
When `extended` is specified, it also shows the database's properties. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EXTENDED
for consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
|
||
### Example | ||
{% highlight sql %} | ||
DESCRIBE DATABASE EXTENDED tempdb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you provide any output? this doc page isn't giving much additional info (though there is not a lot to know, granted)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
a3595ac
to
25db698
Compare
### Example | ||
{% highlight sql %} | ||
-- Create employees DATABASE | ||
CREATE DATABASE EMPLOYEES COMMENT 'For software companies'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kevinyu98 lets use lowercase for EMPLOYEES
to match other PRS..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dilipbiswal sure
|
||
-- Describe employees DATABASE. | ||
-- Returns Database Name, Description and Root location of the filesystem for the employees DATABASE | ||
DESCRIBE DATABASE Employees; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kevinyu98 ditto.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
CREATE DATABASE EMPLOYEES COMMENT 'For software companies'; | ||
|
||
-- Describe employees DATABASE. | ||
-- Returns Database Name, Description and Root location of the filesystem for the employees DATABASE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kevinyu98 Can we please put DATABASE in another line with a comment marker. ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
-- Describe employees DATABASE. | ||
-- Returns Database Name, Description and Root location of the filesystem for the employees DATABASE | ||
DESCRIBE DATABASE Employees; | ||
+-------------------------+-----------------------------+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kevinyu98 Can we keep the results 2 spaces to the right to match other PRs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
|
||
{% highlight sql %} | ||
-- Create employees DATABASE | ||
CREATE DATABASE EMPLOYEES COMMENT 'For software companies'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kevinyu98 lowercase employees.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
-- Alter employees database to set DBPROPERTIES | ||
ALTER DATABASE EMPLOYEES SET DBPROPERTIES ('Create-by' = 'Kevin', 'Create-date' = '09/01/2019'); | ||
|
||
-- Describe employees DATABASE with EXTENDED option to the database properties |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kevinyu98 "to return additional database properties"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
|
||
{% highlight sql %} | ||
-- Create deployment SCHEMA | ||
CREATE SCHEMA DEPLOYMENT comment 'Deployment environment'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kevinyu98 lowercase ..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
LGTM |
ok to test |
Test build #110203 has finished for PR 25528 at commit
|
LGTM Thanks! Merged to master. |
@gatorsmile thank a lot. |
retest this please |
…eference ### What changes were proposed in this pull request? Document DESCRIBE DATABASE statement in SQL Reference ### Why are the changes needed? To complete the SQL Reference ### Does this PR introduce any user-facing change? Yes #### Before There is no documentation for this command in sql reference #### After ![Screen Shot 2019-09-05 at 12 59 32 PM](https://user-images.githubusercontent.com/7550280/64379235-53aec800-cfe3-11e9-8a51-ea55f0455c47.png) ![Screen Shot 2019-09-05 at 12 59 45 PM](https://user-images.githubusercontent.com/7550280/64379247-58737c00-cfe3-11e9-9a51-f12c5c5bc26a.png) ### How was this patch tested? Used jekyll build and serve to verify Closes apache#25528 from kevinyu98/sql-ref-describe. Lead-authored-by: Kevin Yu <qyu@us.ibm.com> Co-authored-by: Xiao Li <gatorsmile@gmail.com> Signed-off-by: Xiao Li <gatorsmile@gmail.com>
What changes were proposed in this pull request?
Document DESCRIBE DATABASE statement in SQL Reference
Why are the changes needed?
To complete the SQL Reference
Does this PR introduce any user-facing change?
Yes
Before
There is no documentation for this command in sql reference
After
How was this patch tested?
Used jekyll build and serve to verify