You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Nándor Kollár (Jira)" <ji...@apache.org> on 2026/10/06 14:04:00 UTC

[jira] [Assigned] (IMPALA-15364) Should not allow adding "not null" column without default in Iceberg

     [ https://issues.apache.org/jira/browse/IMPALA-15364?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nándor Kollár reassigned IMPALA-15364:
--------------------------------------

    Assignee: Nándor Kollár

> Should not allow adding "not null" column without default in Iceberg
> --------------------------------------------------------------------
>
>                 Key: IMPALA-15364
>                 URL: https://issues.apache.org/jira/browse/IMPALA-15364
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>            Reporter: Csaba Ringhofer
>            Assignee: Nándor Kollár
>            Priority: Major
>              Labels: impala-iceberg
>
> create table ticenonnull (i int not null) stored as iceberg;
> insert into ticenonnull values (1);
> alter table ticenonnull add columns (j int not null);
> My expectation was that adding a non null column without default value is rejected, because existing rows wouldn't have a valid value for that column
> What actually happens is that not null is silently omitted and a nullable column is added:
> describe ticenonnull;
> +------+------+---------+----------+
> | name | type | comment | nullable |
> +------+------+---------+----------+
> | i  | int |     | false  |
> | j  | int |     | true   |
> +------+------+---------+----------+
> Kudu tables have a check to reject the alter table:
> https://github.com/apache/impala/blob/ac16a39210df9999f8dd1941e3fa513594f9aab2/fe/src/main/java/org/apache/impala/analysis/AlterTableAddColsStmt.java#L124
> One question is whether to allow this if the table is empty - at the moment the behavior is still buggy (ignoring NOT NULL), but in theory it could be done.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org