You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by xu...@apache.org on 2015/11/30 01:11:50 UTC

[53/91] [abbrv] hive git commit: HIVE-12472: Add test case for HIVE-10592 (Prasanth Jayachandran reviewed by Ashutosh Chauhan)

HIVE-12472: Add test case for HIVE-10592 (Prasanth Jayachandran reviewed by  Ashutosh Chauhan)


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

Branch: refs/heads/spark
Commit: 8e9bae21af939fa5f264261662fd229f0e72fa70
Parents: 7f4379a
Author: Prasanth Jayachandran <j....@gmail.com>
Authored: Fri Nov 20 17:38:09 2015 -0600
Committer: Prasanth Jayachandran <j....@gmail.com>
Committed: Fri Nov 20 17:38:09 2015 -0600

----------------------------------------------------------------------
 .../queries/clientpositive/orc_ppd_is_null.q    | 20 +++++++
 .../clientpositive/orc_ppd_is_null.q.out        | 56 ++++++++++++++++++++
 2 files changed, 76 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/8e9bae21/ql/src/test/queries/clientpositive/orc_ppd_is_null.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/orc_ppd_is_null.q b/ql/src/test/queries/clientpositive/orc_ppd_is_null.q
new file mode 100644
index 0000000..862a961
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/orc_ppd_is_null.q
@@ -0,0 +1,20 @@
+SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
+SET mapred.min.split.size=1000;
+SET mapred.max.split.size=5000;
+
+create table newtypesorc(c char(10), v varchar(10), d date, ts timestamp) stored as orc tblproperties("orc.stripe.size"="16777216"); 
+
+insert overwrite table newtypesorc select * from (select cast("apple" as char(10)), cast("bee" as varchar(10)), null, null from src src1 union all select cast("hello" as char(10)), cast("world" as varchar(10)), null, null from src src2) uniontbl;
+
+set hive.optimize.index.filter=false;
+select sum(hash(*)) from newtypesorc where ts is null;
+
+set hive.optimize.index.filter=true;
+select sum(hash(*)) from newtypesorc where ts is null;
+
+set hive.optimize.index.filter=false;
+select sum(hash(*)) from newtypesorc where d is null;
+
+set hive.optimize.index.filter=true;
+select sum(hash(*)) from newtypesorc where d is null;
+

http://git-wip-us.apache.org/repos/asf/hive/blob/8e9bae21/ql/src/test/results/clientpositive/orc_ppd_is_null.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/orc_ppd_is_null.q.out b/ql/src/test/results/clientpositive/orc_ppd_is_null.q.out
new file mode 100644
index 0000000..954e175
--- /dev/null
+++ b/ql/src/test/results/clientpositive/orc_ppd_is_null.q.out
@@ -0,0 +1,56 @@
+PREHOOK: query: create table newtypesorc(c char(10), v varchar(10), d date, ts timestamp) stored as orc tblproperties("orc.stripe.size"="16777216")
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@newtypesorc
+POSTHOOK: query: create table newtypesorc(c char(10), v varchar(10), d date, ts timestamp) stored as orc tblproperties("orc.stripe.size"="16777216")
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@newtypesorc
+PREHOOK: query: insert overwrite table newtypesorc select * from (select cast("apple" as char(10)), cast("bee" as varchar(10)), null, null from src src1 union all select cast("hello" as char(10)), cast("world" as varchar(10)), null, null from src src2) uniontbl
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@newtypesorc
+POSTHOOK: query: insert overwrite table newtypesorc select * from (select cast("apple" as char(10)), cast("bee" as varchar(10)), null, null from src src1 union all select cast("hello" as char(10)), cast("world" as varchar(10)), null, null from src src2) uniontbl
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@newtypesorc
+POSTHOOK: Lineage: newtypesorc.c EXPRESSION []
+POSTHOOK: Lineage: newtypesorc.d EXPRESSION []
+POSTHOOK: Lineage: newtypesorc.ts EXPRESSION []
+POSTHOOK: Lineage: newtypesorc.v EXPRESSION []
+PREHOOK: query: select sum(hash(*)) from newtypesorc where ts is null
+PREHOOK: type: QUERY
+PREHOOK: Input: default@newtypesorc
+#### A masked pattern was here ####
+POSTHOOK: query: select sum(hash(*)) from newtypesorc where ts is null
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@newtypesorc
+#### A masked pattern was here ####
+80926068000
+PREHOOK: query: select sum(hash(*)) from newtypesorc where ts is null
+PREHOOK: type: QUERY
+PREHOOK: Input: default@newtypesorc
+#### A masked pattern was here ####
+POSTHOOK: query: select sum(hash(*)) from newtypesorc where ts is null
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@newtypesorc
+#### A masked pattern was here ####
+80926068000
+PREHOOK: query: select sum(hash(*)) from newtypesorc where d is null
+PREHOOK: type: QUERY
+PREHOOK: Input: default@newtypesorc
+#### A masked pattern was here ####
+POSTHOOK: query: select sum(hash(*)) from newtypesorc where d is null
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@newtypesorc
+#### A masked pattern was here ####
+80926068000
+PREHOOK: query: select sum(hash(*)) from newtypesorc where d is null
+PREHOOK: type: QUERY
+PREHOOK: Input: default@newtypesorc
+#### A masked pattern was here ####
+POSTHOOK: query: select sum(hash(*)) from newtypesorc where d is null
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@newtypesorc
+#### A masked pattern was here ####
+80926068000