-
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-28800][DOC][SQL] Document REPAIR TABLE statement in SQL Reference #25884
Conversation
Test build #111123 has finished for PR 25884 at commit
|
@dilipbiswal @gatorsmile Please review this one too. Thanks! |
@@ -19,4 +19,18 @@ license: | | |||
limitations under the License. | |||
--- | |||
|
|||
**This page is under construction** | |||
### Description | |||
`MSCK REPAIR TABLE` recovers all the partitions in the directory of a table and updates the catalog. `MSCK REPAIR TABLE` on a non-existent table or a table without partitions throws Exception. Another way to recover partitions is to use `ALTER TABLE RECOVER PARTITIONS`. |
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.
throws Exception -> throws an exception.
Is there anything else we can say about when this would become necessary? when do you need to recover a table, and is there any more to say about what it updates in the catalog / metastore? No need to say a lot, just trying to make this slightly more useful to a reader.
Test build #111809 has finished for PR 25884 at commit
|
@@ -19,4 +19,45 @@ license: | | |||
limitations under the License. | |||
--- | |||
|
|||
**This page is under construction** | |||
### Description | |||
`MSCK REPAIR TABLE` recovers all the partitions in the directory of a table and updates the Hive metastore. When creating a table using `partitoned by` clause, partitions are generated and registered in the Hive metastore. However, if the partitioned table is created from existing data, partitions are not registered automatically in the Hive metastore. User needs to run MSCK REPAIR TABLE to register the partitions. `MSCK REPAIR TABLE` on a non-existent table or a table without partitions throws an exception. Another way to recover partitions is to use `ALTER TABLE RECOVER PARTITIONS`. |
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.
(Pardon me if this is duplicated - thought I left this comment but doesn't look like it now.)
Maybe back-tick the last occurrence of "MSCK REPAIR TABLE"?
and maybe partitioned by
-> PARTITIONED BY
Test build #111819 has finished for PR 25884 at commit
|
Merged to master |
Thanks a lot! @srowen |
What changes were proposed in this pull request?
Document REPAIR TABLE statement in SQL Reference.
Why are the changes needed?
To complete SQL reference.
Does this PR introduce any user-facing change?
Yes.
After the change, we will have the following
How was this patch tested?
Tested using jykyll build --serve