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_r389207041
########## 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> ::= + (partition_column = partition_col_value, partition_column = partition_col_value, ...) +``` + +#### Examples Review comment: 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. ---------------------------------------------------------------- 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]
