[TRAFODION-1912] add more regression test cases add test for numeric the original test is already date add test to cover null
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/c6c25f00 Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/c6c25f00 Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/c6c25f00 Branch: refs/heads/master Commit: c6c25f00470011f2f7e820af0f619ac2443fab86 Parents: ffbe091 Author: Liu Ming <[email protected]> Authored: Fri Apr 8 04:04:10 2016 +0000 Committer: Liu Ming <[email protected]> Committed: Fri Apr 8 04:04:10 2016 +0000 ---------------------------------------------------------------------- core/sql/regress/hive/EXPECTED005 | 37 +++++++++++++++++++++++++++ core/sql/regress/hive/TEST005 | 10 ++++++++ core/sql/regress/hive/TEST005_a.hive.sql | 8 ++++++ 3 files changed, 55 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/c6c25f00/core/sql/regress/hive/EXPECTED005 ---------------------------------------------------------------------- diff --git a/core/sql/regress/hive/EXPECTED005 b/core/sql/regress/hive/EXPECTED005 index 53cafed..26bb17b 100644 --- a/core/sql/regress/hive/EXPECTED005 +++ b/core/sql/regress/hive/EXPECTED005 @@ -497,4 +497,41 @@ C1 C2 C3 C4 >>cqd HIVE_SCAN_SPECIAL_MODE reset; --- SQL operation complete. +>>drop table trafodion.seabase.tbl_dos_num; + +--- SQL operation complete. +>>create table trafodion.seabase.tbl_dos_num (c1 int, c2 int); + +--- SQL operation complete. +>>load with NO OUTPUT into trafodion.seabase.tbl_dos_num select * from tbl_dos_num; + +*** ERROR[8413] The string argument contains characters that cannot be converted. + +--- 0 row(s) loaded. +>>cqd HIVE_SCAN_SPECIAL_MODE '1'; + +--- SQL operation complete. +>>load with no output into trafodion.seabase.tbl_dos_num select * from tbl_dos_num; + +--- 10 row(s) loaded. +>>select * from trafodion.seabase.tbl_dos_num; + +C1 C2 +----------- ----------- + + 0 39478 + 1 21944 + 2 32730 + 3 19653 + 4 67794 + 5 93265 + 6 ? + 7 ? + 8 ? + 9 17 + +--- 10 row(s) selected. +>>cqd HIVE_SCAN_SPECIAL_MODE reset; + +--- SQL operation complete. >>log; http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/c6c25f00/core/sql/regress/hive/TEST005 ---------------------------------------------------------------------- diff --git a/core/sql/regress/hive/TEST005 b/core/sql/regress/hive/TEST005 index 96ed8ac..993ea1b 100644 --- a/core/sql/regress/hive/TEST005 +++ b/core/sql/regress/hive/TEST005 @@ -32,6 +32,7 @@ sh regrhadoop.ksh fs -mkdir /user/hive/exttables/tbl_utf8; sh regrhadoop.ksh fs -mkdir /user/hive/exttables/tbl_type; sh regrhadoop.ksh fs -mkdir /user/hive/exttables/tbl_gbk; sh regrhadoop.ksh fs -mkdir /user/hive/exttables/tbl_dos; +sh regrhadoop.ksh fs -mkdir /user/hive/exttables/tbl_dos_num; --empty folders sh regrhadoop.ksh fs -rm /user/hive/exttables/customer_ddl/*; sh regrhadoop.ksh fs -rm /user/hive/exttables/customer_temp/*; @@ -39,6 +40,7 @@ sh regrhadoop.ksh fs -rm /user/hive/exttables/tbl_utf8/*; sh regrhadoop.ksh fs -rm /user/hive/exttables/tbl_type/*; sh regrhadoop.ksh fs -rm /user/hive/exttables/tbl_gbk/*; sh regrhadoop.ksh fs -rm /user/hive/exttables/tbl_dos/*; +sh regrhadoop.ksh fs -rm /user/hive/exttables/tbl_dos_num/*; --- setup Hive tables sh regrhive.ksh -v -f $REGRTSTDIR/TEST005_a.hive.sql; @@ -46,6 +48,7 @@ sh regrhadoop.ksh fs -put $REGRTSTDIR/tbl_utf8.data /user/hive/exttables/tbl_utf sh regrhadoop.ksh fs -put $REGRTSTDIR/tbl_type.data /user/hive/exttables/tbl_type; sh regrhadoop.ksh fs -put $REGRTSTDIR/tbl_gbk.data /user/hive/exttables/tbl_gbk; sh regrhadoop.ksh fs -put $REGRTSTDIR/tbl_dos.data /user/hive/exttables/tbl_dos; +sh regrhadoop.ksh fs -put $REGRTSTDIR/tbl_dos_numeric.data /user/hive/exttables/tbl_dos_num; log LOG005 clear; @@ -233,4 +236,11 @@ cqd HIVE_FILE_CHARSET reset; cqd HIVE_SCAN_SPECIAL_MODE '1'; select * from tbl_dos; cqd HIVE_SCAN_SPECIAL_MODE reset; +drop table trafodion.seabase.tbl_dos_num; +create table trafodion.seabase.tbl_dos_num (c1 int, c2 int); +load with NO OUTPUT into trafodion.seabase.tbl_dos_num select * from tbl_dos_num; +cqd HIVE_SCAN_SPECIAL_MODE '1'; +load with no output into trafodion.seabase.tbl_dos_num select * from tbl_dos_num; +select * from trafodion.seabase.tbl_dos_num; +cqd HIVE_SCAN_SPECIAL_MODE reset; log; http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/c6c25f00/core/sql/regress/hive/TEST005_a.hive.sql ---------------------------------------------------------------------- diff --git a/core/sql/regress/hive/TEST005_a.hive.sql b/core/sql/regress/hive/TEST005_a.hive.sql index cf1fbb4..22662bd 100644 --- a/core/sql/regress/hive/TEST005_a.hive.sql +++ b/core/sql/regress/hive/TEST005_a.hive.sql @@ -173,3 +173,11 @@ CREATE external TABLE tbl_dos( row format delimited fields terminated by '|' location '/user/hive/exttables/tbl_dos' ; + +drop table tbl_dos_num; +CREATE external TABLE tbl_dos_num( + c1 int, + c2 int) +row format delimited fields terminated by '|' +location '/user/hive/exttables/tbl_dos_num' +;
