[ https://issues.apache.org/jira/browse/IMPALA-7832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16737671#comment-16737671 ]
Paul Rogers commented on IMPALA-7832: ------------------------------------- Turns out our existing syntax is: {noformat} ALTER TABLE <table> (REPLACE|ADD) COLUMNS ( ... ) {noformat} That is, our syntax allows multiple columns per statement, not just one as in the ISO SQL. So, we could do two things: * Add ISO SQL syntax that [~grahn] provided. * Modify our existing syntax as shown in the original description. This ensures that we are both SQL-compliant and backward-compatible. I believe that the two syntax variations can co-exist, I don't believe that they lead to ambiguities, but the parser generator will tell us if they are. > 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 > > 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