add upsert test cases
Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/27952401 Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/27952401 Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/27952401 Branch: refs/heads/master Commit: 27952401f3a2b7ca4d4fdd05a77d0a2e120ae182 Parents: 5f58cd9 Author: Liu Ming <[email protected]> Authored: Tue Mar 20 23:59:09 2018 +0000 Committer: Liu Ming <[email protected]> Committed: Tue Mar 20 23:59:09 2018 +0000 ---------------------------------------------------------------------- core/sql/parser/ElemDDLColDef.h | 8 -------- core/sql/regress/seabase/EXPECTED020 | 8 +++++++- core/sql/regress/seabase/TEST020 | 2 ++ 3 files changed, 9 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafodion/blob/27952401/core/sql/parser/ElemDDLColDef.h ---------------------------------------------------------------------- diff --git a/core/sql/parser/ElemDDLColDef.h b/core/sql/parser/ElemDDLColDef.h index 25dd0a3..4b78484 100644 --- a/core/sql/parser/ElemDDLColDef.h +++ b/core/sql/parser/ElemDDLColDef.h @@ -127,7 +127,6 @@ public: // 3. The DEFAULT clause appears. inline ItemExpr * getDefaultValueExpr() const; - inline Int32 getErrorCode() const; // returns the default value specified in the DEFAULT // clause; returns the NULL pointer value if NO DEFAULT @@ -313,7 +312,6 @@ private: NABoolean isColDefaultSpec_; - Int32 errCode_; }; // class ElemDDLColDef // ----------------------------------------------------------------------- @@ -408,12 +406,6 @@ ElemDDLColDef::getDefaultValueExpr() const return pDefault_; } -inline Int32 -ElemDDLColDef::getErrorCode() const -{ - return errCode_; -} - inline const NAString & ElemDDLColDef::getComputedDefaultExpr() const { http://git-wip-us.apache.org/repos/asf/trafodion/blob/27952401/core/sql/regress/seabase/EXPECTED020 ---------------------------------------------------------------------- diff --git a/core/sql/regress/seabase/EXPECTED020 b/core/sql/regress/seabase/EXPECTED020 index 3396b6d..32c151d 100644 --- a/core/sql/regress/seabase/EXPECTED020 +++ b/core/sql/regress/seabase/EXPECTED020 @@ -3958,12 +3958,18 @@ AAAA ? 2 >>insert into test020t45(e) values(1),(2),(3); --- 3 row(s) inserted. +>>upsert into test020t45(e) values(4),(5); + +--- 2 row(s) inserted. +>>upsert using load into test020t45(e) values (6); + +--- 1 row(s) inserted. >>select count(*) from test020t45 where c = to_char(sysdate,'YYYYMMDD'); (EXPR) -------------------- - 3 + 6 --- 1 row(s) selected. >>--negative tests http://git-wip-us.apache.org/repos/asf/trafodion/blob/27952401/core/sql/regress/seabase/TEST020 ---------------------------------------------------------------------- diff --git a/core/sql/regress/seabase/TEST020 b/core/sql/regress/seabase/TEST020 index 80681ae..deb6583 100755 --- a/core/sql/regress/seabase/TEST020 +++ b/core/sql/regress/seabase/TEST020 @@ -940,6 +940,8 @@ create table test020t45(a largeint not null default unix_timestamp(), --d int not null default testi020_seq.nextval, e int ); insert into test020t45(e) values(1),(2),(3); +upsert into test020t45(e) values(4),(5); +upsert using load into test020t45(e) values (6); select count(*) from test020t45 where c = to_char(sysdate,'YYYYMMDD'); --negative tests --the function is not variable-free, so should fail
