huaxingao commented on a change in pull request #35239: URL: https://github.com/apache/spark/pull/35239#discussion_r793248260
########## File path: docs/sql-ref-syntax-ddl-alter-table.md ########## @@ -75,6 +75,50 @@ ALTER TABLE table_identifier ADD COLUMNS ( col_spec [ , ... ] ) Specifies the columns to be added. +### DROP COLUMNS + +`ALTER TABLE DROP COLUMNS` statement drops mentioned columns from an existing table. +Note that this statement is only supported with v2 tables. + + +#### Syntax + +```sql +ALTER TABLE table_identifier DROP COLUMNS ( col_name1, ... ) +``` Review comment: Here is the syntax: ``` | ALTER TABLE multipartIdentifier DROP (COLUMN | COLUMNS) '(' columns=multipartIdentifierList ')' #dropTableColumns | ALTER TABLE multipartIdentifier DROP (COLUMN | COLUMNS) columns=multipartIdentifierList #dropTableColumns ``` So I think it's something like this: ``` ALTER TABLE table_identifier DROP { COLUMN | COLUMNS } [ ( ] col_name [ , ... ] [ ) ] ``` I guess add a parameter in the below section for `col_name`. You might want to change the add column syntax too to make it more accurate. -- 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. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org