srowen commented on a change in pull request #25884: [SPARK-28800][DOC][SQL] 
Document REPAIR TABLE statement in SQL Reference
URL: https://github.com/apache/spark/pull/25884#discussion_r331793102
 
 

 ##########
 File path: docs/sql-ref-syntax-ddl-repair-table.md
 ##########
 @@ -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`.
 
 Review comment:
   (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`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to