You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/03/07 00:43:41 UTC

[GitHub] [spark] nchammas commented on a change in pull request #27840: [SPARK-31075] Add documentation for ALTER TABLE ... ADD PARTITION

nchammas commented on a change in pull request #27840: [SPARK-31075] Add documentation for ALTER TABLE ... ADD PARTITION
URL: https://github.com/apache/spark/pull/27840#discussion_r389206936
 
 

 ##########
 File path: docs/sql-ref-syntax-ddl-alter-table.md
 ##########
 @@ -83,6 +83,37 @@ ALTER TABLE table_identifier ADD COLUMNS ( col_spec [ , col_spec ... ] )
 </dl>
 
 
+### ADD PARTITION
+
+`ALTER TABLE ADD PARTITION` adds a new partition to an existing, partitioned table.
+
+#### Syntax
+
+```sql
+ALTER TABLE <table_identifier> ADD [IF NOT EXISTS]
+  PARTITION <partition_spec> [LOCATION 'location']
+  [ PARTITION <partition_spec> [LOCATION 'location'] ...]
+;
+
+<table_identifier> ::=
+  [ database_name. ]table_name
+
+<partition_spec> ::=
 
 Review comment:
   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](https://docs.microsoft.com/en-us/sql/t-sql/statements/create-table-transact-sql), 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.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org