hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vik...@apache.org
Subject hive git commit: HIVE-11829: Create test for HIVE-11216 (Vikram Dixit K, reviewed by Jason Dere)
Date Wed, 21 Oct 2015 22:53:53 GMT
Repository: hive
Updated Branches:
  refs/heads/branch-1 09f24e712 -> 1985527a5


HIVE-11829: Create test for HIVE-11216 (Vikram Dixit K, reviewed by Jason Dere)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/1985527a
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/1985527a
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/1985527a

Branch: refs/heads/branch-1
Commit: 1985527a567e2cbdd0b846dfde1f06b172bfdc8d
Parents: 09f24e7
Author: vikram <vikram@hortonworks.com>
Authored: Wed Oct 21 14:12:33 2015 -0700
Committer: vikram <vikram@hortonworks.com>
Committed: Wed Oct 21 15:08:24 2015 -0700

----------------------------------------------------------------------
 data/files/mapNull.txt                          |  1 +
 ql/src/test/queries/clientpositive/nullMap.q    | 14 ++++++
 .../test/results/clientpositive/nullMap.q.out   | 46 ++++++++++++++++++++
 3 files changed, 61 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/1985527a/data/files/mapNull.txt
----------------------------------------------------------------------
diff --git a/data/files/mapNull.txt b/data/files/mapNull.txt
new file mode 100644
index 0000000..dea2f13
--- /dev/null
+++ b/data/files/mapNull.txt
@@ -0,0 +1 @@
+1\N

http://git-wip-us.apache.org/repos/asf/hive/blob/1985527a/ql/src/test/queries/clientpositive/nullMap.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/nullMap.q b/ql/src/test/queries/clientpositive/nullMap.q
new file mode 100644
index 0000000..d2784b7
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/nullMap.q
@@ -0,0 +1,14 @@
+create table map_txt (
+  id int,
+  content map<int,string>
+)
+row format delimited 
+null defined as '\\N'
+stored as textfile
+;
+
+LOAD DATA LOCAL INPATH '../../data/files/mapNull.txt' INTO TABLE map_txt;
+
+select * from map_txt;
+
+select id, map_keys(content) from map_txt;

http://git-wip-us.apache.org/repos/asf/hive/blob/1985527a/ql/src/test/results/clientpositive/nullMap.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/nullMap.q.out b/ql/src/test/results/clientpositive/nullMap.q.out
new file mode 100644
index 0000000..af9b606
--- /dev/null
+++ b/ql/src/test/results/clientpositive/nullMap.q.out
@@ -0,0 +1,46 @@
+PREHOOK: query: create table map_txt (
+  id int,
+  content map<int,string>
+)
+row format delimited 
+null defined as '\\N'
+stored as textfile
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@map_txt
+POSTHOOK: query: create table map_txt (
+  id int,
+  content map<int,string>
+)
+row format delimited 
+null defined as '\\N'
+stored as textfile
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@map_txt
+PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/mapNull.txt' INTO TABLE map_txt
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@map_txt
+POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/mapNull.txt' INTO TABLE map_txt
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@map_txt
+PREHOOK: query: select * from map_txt
+PREHOOK: type: QUERY
+PREHOOK: Input: default@map_txt
+#### A masked pattern was here ####
+POSTHOOK: query: select * from map_txt
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@map_txt
+#### A masked pattern was here ####
+1	NULL
+PREHOOK: query: select id, map_keys(content) from map_txt
+PREHOOK: type: QUERY
+PREHOOK: Input: default@map_txt
+#### A masked pattern was here ####
+POSTHOOK: query: select id, map_keys(content) from map_txt
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@map_txt
+#### A masked pattern was here ####
+1	[]


Mime
View raw message