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

[jira] [Created] (TRAFODION-2254) Self referencing upsert with missing values into aligned tables return an error

Selvaganesan Govindarajan created TRAFODION-2254:
----------------------------------------------------

             Summary: Self referencing upsert with missing values into aligned tables return an error
                 Key: TRAFODION-2254
                 URL: https://issues.apache.org/jira/browse/TRAFODION-2254
             Project: Apache Trafodion
          Issue Type: Bug
          Components: sql-cmp
    Affects Versions: any
            Reporter: Selvaganesan Govindarajan


self referencing upsert with missing values into aligned tables return
an error if cqd traf_upsert_mode is set to 'MERGE' (default value). The plan doesn't have
a blocking operator.
>>create table t (a int not null primary key, b int, c int) attribute aligned format;
— SQL operation complete.
>>set transaction autocommit off;
— SQL operation complete.
>>upsert into t (a,c) select a,c from t;
ERROR[8107] Self-referencing INSERT statement without blocking operator is not allowed with AUTOCOMMIT OFF.
— 0 row(s) inserted.
>>explain options 'f' upsert into t (a,c) select a,c from t;
LC RC OP OPERATOR OPT DESCRIPTION CARD
---- ---- ---- -------------------- -------- -------------------- ---------
3 . 4 root x 1.00E+002
1 2 3 tuple_flow 1.00E+002
. . 2 trafodion_merge T 1.00E+000
. . 1 trafodion_scan T 1.00E+002
— SQL operation complete.
>>cqd traf_upsert_mode 'REPLACE';
— SQL operation complete.
>>
>>explain options 'f' upsert into t (a,c) select a,c from t;
LC RC OP OPERATOR OPT DESCRIPTION CARD
---- ---- ---- -------------------- -------- -------------------- ---------
4 . 5 root x 1.00E+002
2 3 4 tuple_flow 1.00E+002
. . 3 trafodion_vsbb_upser T 1.00E+000
1 . 2 sort 1.00E+002
. . 1 trafodion_scan T 1.00E+002
— SQL operation complete.
>>
>>upsert into t (a,c) select a,c from t;
— 0 row(s) inserted.
>>



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