Aleksey created IMPALA-13273:
--------------------------------

             Summary: Inconsistent handling of NOT NULL fields in iceberg tables
                 Key: IMPALA-13273
                 URL: https://issues.apache.org/jira/browse/IMPALA-13273
             Project: IMPALA
          Issue Type: Bug
          Components: Frontend
    Affects Versions: Impala 4.4.0
            Reporter: Aleksey


Since [IMPALA-12729|https://issues.apache.org/jira/browse/IMPALA-12729] has 
been introduced, the following scenario occurs:

 
{code:java}
-- step 1 - create iceberg table without pk, but with not null
create table t_ice_constr(c1 int not null) stored as iceberg;
-- step 2 - insert success, parquet file contains null
insert into t_ice_constr select null;
-- step 3 - select returns 0
select c1 from t_ice_constr;
-- step 4 - select returns no rows
select c1 from t_ice_constr where c1 = 0;
-- step 5 - select return no rows
select c1 from t_ice_constr where c1 is null;
{code}
 


It seems to be an inconsistency here. Expected results - either 1 row on step 
4, or null in step 3 and 1 row on step 5.
This behavior is supposedly caused by this change: 
[https://github.com/apache/impala/commit/73171cb7164573349bd53a996a51bb7058b778e0#diff-adcc0990c7301e45752d00f6d8e65b192bfadffe179056037a7e14aff8718856R180]



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

Reply via email to