[ https://issues.apache.org/jira/browse/IMPALA-7832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16751384#comment-16751384 ]
ASF subversion and git services commented on IMPALA-7832: --------------------------------------------------------- Commit bfb9ccc8e02be20fb8b57bae4d55e4094ab7ea3f in impala's branch refs/heads/master from Fredy Wijaya [ https://gitbox.apache.org/repos/asf?p=impala.git;h=bfb9ccc ] IMPALA-7832: Support for IF NOT EXISTS in ALTER TABLE ADD COLUMN(S) This patch adds IF NOT EXISTS support in ALTER TABLE ADD COLUMN and ALTER TABLE ADD COLUMNS. If IF NOT EXISTS is specified and a column already exists with this name, no error is thrown. If IF NOT EXISTS is specified for multiple columns and a column already exists, no error is thrown and a new column that does not exist will be added. Syntax: ALTER TABLE tbl ADD COLUMN [IF NOT EXISTS] i int ALTER TABLE tbl ADD [IF NOT EXISTS] COLUMNS (i int, j int) Testing: - Added new FE tests - Ran all FE tests - Updated E2E DDL tests - Ran all E2E DDL tests Change-Id: I60ed22c8a8eefa10e94ad3dedf32fe67c16642d9 Reviewed-on: http://gerrit.cloudera.org:8080/12181 Reviewed-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> > Support IF NOT EXISTS in alter table add columns > ------------------------------------------------ > > Key: IMPALA-7832 > URL: https://issues.apache.org/jira/browse/IMPALA-7832 > Project: IMPALA > Issue Type: New Feature > Components: Frontend > Affects Versions: Impala 3.1.0 > Reporter: Thomas Tauber-Marshall > Assignee: Fredy Wijaya > Priority: Minor > Labels: ramp-up > Fix For: Impala 3.2.0 > > > alter table <table_name> add [if not exists] columns (<name> <type> [, <name> > <type>...]) > would add the column only if a column of the same name does not already exist > Probably worth checking out what other databases do in different situations, > eg. if the column already exists but with a different type, if "replace" is > used instead of "add", etc. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org For additional commands, e-mail: issues-all-h...@impala.apache.org