mirror of
https://github.com/apache/impala.git
synced 2026-01-29 21:00:18 -05:00
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-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>