You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by se...@apache.org on 2016/05/08 01:24:27 UTC

[2/4] incubator-trafodion git commit: [TRAFODION-1920] add test cases for not nullable column

[TRAFODION-1920] add test cases for not nullable column


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/e15da4e5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/e15da4e5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/e15da4e5

Branch: refs/heads/master
Commit: e15da4e511f2a04445d3eaa2d3df5acec82c70eb
Parents: 67b89f8
Author: Liu Ming <mi...@esgyn.cn>
Authored: Wed May 4 02:48:33 2016 +0000
Committer: Liu Ming <mi...@esgyn.cn>
Committed: Wed May 4 02:48:33 2016 +0000

----------------------------------------------------------------------
 core/sql/regress/hive/EXPECTED005 | 42 ++++++++++++++++++++++++++++++++++
 core/sql/regress/hive/TEST005     | 18 +++++++++++++++
 2 files changed, 60 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/e15da4e5/core/sql/regress/hive/EXPECTED005
----------------------------------------------------------------------
diff --git a/core/sql/regress/hive/EXPECTED005 b/core/sql/regress/hive/EXPECTED005
index 10e7121..eff0c42 100644
--- a/core/sql/regress/hive/EXPECTED005
+++ b/core/sql/regress/hive/EXPECTED005
@@ -580,12 +580,54 @@ C1           C2                    C3                         C4               C
 *** ERROR[8413] The string argument contains characters that cannot be converted.
 
 --- 0 row(s) loaded.
+>>insert into trafodion.seabase.traf_tbl_bad select * from tbl_bad;
+
+*** ERROR[8413] The string argument contains characters that cannot be converted.
+
+--- 0 row(s) inserted.
+>>upsert into trafodion.seabase.traf_tbl_bad select * from tbl_bad;
+
+*** ERROR[8413] The string argument contains characters that cannot be converted.
+
+--- 0 row(s) inserted.
 >>cqd HIVE_SCAN_SPECIAL_MODE '2';
 
 --- SQL operation complete.
 >>load with no output into trafodion.seabase.traf_tbl_bad select * from tbl_bad;
 
 --- 8 row(s) loaded.
+>>insert into trafodion.seabase.traf_tbl_bad select * from tbl_bad;
+
+--- 8 row(s) inserted.
+>>upsert into trafodion.seabase.traf_tbl_bad select * from tbl_bad;
+
+--- 8 row(s) inserted.
+>>cqd HIVE_SCAN_SPECIAL_MODE reset;
+
+--- SQL operation complete.
+>>drop table if exists trafodion.seabase.traf_tbl_bad;
+
+--- SQL operation complete.
+>>create table trafodion.seabase.traf_tbl_bad (
++>c1 int not null,
++>c2 largeint not null,
++>c3 varchar(25),
++>c4 real,
++>c5 smallint,
++>c6 timestamp(6) not null,
++>c7 float(54) not null,
++>c8 smallint
++>);
+
+--- SQL operation complete.
+>>cqd HIVE_SCAN_SPECIAL_MODE '2';
+
+--- SQL operation complete.
+>>insert into trafodion.seabase.traf_tbl_bad select * from tbl_bad;
+
+*** ERROR[8421] NULL cannot be assigned to a NOT NULL column.
+
+--- 0 row(s) inserted.
 >>cqd HIVE_SCAN_SPECIAL_MODE reset;
 
 --- SQL operation complete.

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/e15da4e5/core/sql/regress/hive/TEST005
----------------------------------------------------------------------
diff --git a/core/sql/regress/hive/TEST005 b/core/sql/regress/hive/TEST005
index cebeff4..ad7cf0e 100644
--- a/core/sql/regress/hive/TEST005
+++ b/core/sql/regress/hive/TEST005
@@ -262,7 +262,25 @@ c7 float(54),
 c8 smallint
 );
 load with no output into trafodion.seabase.traf_tbl_bad select * from tbl_bad;
+insert into trafodion.seabase.traf_tbl_bad select * from tbl_bad;
+upsert into trafodion.seabase.traf_tbl_bad select * from tbl_bad;
 cqd HIVE_SCAN_SPECIAL_MODE '2';
 load with no output into trafodion.seabase.traf_tbl_bad select * from tbl_bad;
+insert into trafodion.seabase.traf_tbl_bad select * from tbl_bad;
+upsert into trafodion.seabase.traf_tbl_bad select * from tbl_bad;
+cqd HIVE_SCAN_SPECIAL_MODE reset;
+drop table if exists trafodion.seabase.traf_tbl_bad;
+create table trafodion.seabase.traf_tbl_bad (
+c1 int not null,
+c2 largeint not null,
+c3 varchar(25),
+c4 real,
+c5 smallint,
+c6 timestamp(6) not null,
+c7 float(54) not null,
+c8 smallint
+);
+cqd HIVE_SCAN_SPECIAL_MODE '2';
+insert into trafodion.seabase.traf_tbl_bad select * from tbl_bad;
 cqd HIVE_SCAN_SPECIAL_MODE reset;
 log;