[ https://issues.apache.org/jira/browse/SPARK-30614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17021761#comment-17021761 ]
Wenchen Fan edited comment on SPARK-30614 at 1/23/20 4:22 AM: -------------------------------------------------------------- Hi [~imback82], do you have time to work on it? thanks! was (Author: cloud_fan): Hi [~imback82], do you have time to work in it? thanks! > The native ALTER COLUMN syntax should change one thing at a time > ---------------------------------------------------------------- > > Key: SPARK-30614 > URL: https://issues.apache.org/jira/browse/SPARK-30614 > Project: Spark > Issue Type: New Feature > Components: SQL > Affects Versions: 3.0.0 > Reporter: Wenchen Fan > Priority: Major > > Our native ALTER COLUMN syntax is newly added in 3.0 and almost follows the > SQL standard. > {code} > ALTER TABLE table=multipartIdentifier > (ALTER | CHANGE) COLUMN? column=multipartIdentifier > (TYPE dataType)? > (COMMENT comment=STRING)? > colPosition? > {code} > The SQL standard (section 11.12) only allows changing one property at a time. > This is also true on other recent SQL systems like > snowflake(https://docs.snowflake.net/manuals/sql-reference/sql/alter-table-column.html) > and > redshift(https://docs.aws.amazon.com/redshift/latest/dg/r_ALTER_TABLE.html) > The snowflake has an extension that it allows changing multiple columns at a > time, like ALTER COLUMN c1 TYPE int, c2 TYPE int. If we want to extend the > SQL standard, I think this syntax is better. > For now, let's be conservative and only allow changing one property at a time. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org