[
https://issues.apache.org/jira/browse/IMPALA-2569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Aman Sinha resolved IMPALA-2569.
--------------------------------
Resolution: Later
Inserting nulls implicitly for the additional columns could lead to some
unexpected behavior. The 'DEFAULT' keyword is the preferred approach that some
RDBMS's (e.g Postgres: https://www.postgresql.org/docs/9.3/ddl-default.html)
have supported for quite a while since it puts the responsibility on the user
to define a proper default value for the missing column value. Also, Kudu
already supports this DEFAULT keyword for columns (see
https://docs.cloudera.com/documentation/enterprise/latest/topics/impala_kudu.html#kudu_default_attribute).
We may want to think about similar extension to the Create table ddl. I am
resolving this JIRA for 'later'.
> Support schema evolution by omitting columns from insert
> --------------------------------------------------------
>
> Key: IMPALA-2569
> URL: https://issues.apache.org/jira/browse/IMPALA-2569
> Project: IMPALA
> Issue Type: Improvement
> Components: Frontend
> Affects Versions: Impala 2.2.4
> Reporter: Peter Ebert
> Priority: Minor
>
> Adding a column to a table will break existing sql that inserts using
> alter table table_name add columns (col3)
> insert into table_name
> select col1, col2 -- error thrown, expects 3 columns
> The workaround is to specify each column name in the insert, but many clients
> have 200-1000 column tables (Banks) where a select * would save them much
> development time when evolving their schema. The default behavior should be
> as it is elsewhere, if the column is omitted nulls are inserted.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)