You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Hans Zeller (JIRA)" <ji...@apache.org> on 2016/06/03 20:30:59 UTC

[jira] [Resolved] (TRAFODION-2026) UPSERT into table with index fails when NULL values are used for key columns

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

Hans Zeller resolved TRAFODION-2026.
------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.1-incubating

Fix committed on 6/3/2016 with https://github.com/apache/incubator-trafodion/pull/518

> UPSERT into table with index fails when NULL values are used for key columns
> ----------------------------------------------------------------------------
>
>                 Key: TRAFODION-2026
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2026
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-cmp
>            Reporter: Suresh Subbiah
>            Assignee: Hans Zeller
>             Fix For: 2.1-incubating
>
>
> When an UPSERT statement is transformed to use the MERGE operator, NULL values in the key column are not handled correctly. This causes an error to be raised during compilation.
> *** ERROR[4099] A NULL operand is not allowed in predicate (TRAFODION.SCH.TT1.B = NULL).
> An UPSERT statement is transformed to MERGE when there is an index on the table and when default values are implied by not specifying all columns in the upsert statement.
> To reproduce
> cqd allow_nullable_unique_key_constraint 'on' ;
> create table tt1 ( a int not null, b int, primary key (a,b));
> create index tt1_ix on tt1(b) ;
> upsert into tt1 values (1,1);
> upsert into tt1 values (2,null) ;



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)