-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-31075] Add documentation for ALTER TABLE ... ADD PARTITION #27840
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
Conversation
|
|
||
| #### Syntax | ||
|
|
||
| ```sql |
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.
I don't know why we are using Jinja directives when basic Markdown suffices (since no language selector is needed here), but if we really want to stick to the more verbose {% highlight sql %} I am happy to switch to that.
| <table_identifier> ::= | ||
| [ database_name. ]table_name | ||
|
|
||
| <partition_spec> ::= |
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.
I know we currently have parameters described in a separate section, but I believe having the syntax all described at once is clearer. This also follows the style of Microsoft's SQL Server docs, which I believe are a great model to follow.
But if we really want to stick to the separate "Parameters" section with HTML-based lists, I can switch to that. But I will likely propose in a separate PR that we eliminate raw HTML from these SQL docs unless they are absolutely necessary.
For parameters that need explanation, I suppose we'd still need a separate "Parameters" section, but it would focus on explaining how they work rather than showing syntax. And in this case here I don't think that's necessary since the syntax and examples are good enough.
| (partition_column = partition_col_value, partition_column = partition_col_value, ...) | ||
| ``` | ||
|
|
||
| #### Examples |
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.
Instead of having all examples at the end, I think it's clearer and easier to follow when each command has examples in its own section.
|
cc @huaxingao, who I believe created the main |
|
Test build #119494 has finished for PR 27840 at commit
|
|
@nchammas Thank you very much for working on this. @kevinyu98 has submitted PR #27779 to add the missing ALTER TABLE statements. |
|
Ah, I missed that. Thanks for the pointer. |
What changes were proposed in this pull request?
This PR adds documentation for
ALTER TABLE ... ADD PARTITION.Here's a screenshot:
Why are the changes needed?
Every bit of major Spark SQL syntax should be documented so users know that it's there and how to use it.
Does this PR introduce any user-facing change?
Yes, documentation only.
How was this patch tested?
Built and reviewed the docs locally.