You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2014/08/06 08:41:55 UTC

svn commit: r1616107 - in /hive/branches/cbo/ql/src/test: queries/clientpositive/cbo_correctness.q results/clientpositive/cbo_correctness.q.out

Author: hashutosh
Date: Wed Aug  6 06:41:55 2014
New Revision: 1616107

URL: http://svn.apache.org/r1616107
Log:
HIVE-7619 : Enable views when cbo is on (Ashutosh Chauhan via Harish Butani)

Modified:
    hive/branches/cbo/ql/src/test/queries/clientpositive/cbo_correctness.q
    hive/branches/cbo/ql/src/test/results/clientpositive/cbo_correctness.q.out

Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/cbo_correctness.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/cbo_correctness.q?rev=1616107&r1=1616106&r2=1616107&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/cbo_correctness.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/cbo_correctness.q Wed Aug  6 06:41:55 2014
@@ -180,5 +180,16 @@ select x from (select count(c_int) over(
 select * from (select max(c_int) over (partition by key order by value Rows UNBOUNDED PRECEDING), min(c_int) over (partition by key order by value rows current row), count(c_int) over(partition by key order by value ROWS 1 PRECEDING), avg(value) over (partition by key order by value Rows between unbounded preceding and unbounded following), sum(value) over (partition by key order by value rows between unbounded preceding and current row), avg(c_float) over (partition by key order by value Rows between 1 preceding and unbounded following), sum(c_float) over (partition by key order by value rows between 1 preceding and current row), max(c_float) over (partition by key order by value rows between 1 preceding and unbounded following), min(c_float) over (partition by key order by value rows between 1 preceding and 1 following) from t1) t1;
 select i, a, h, b, c, d, e, f, g, a as x, a +1 as y from (select max(c_int) over (partition by key order by value range UNBOUNDED PRECEDING) a, min(c_int) over (partition by key order by value range current row) b, count(c_int) over(partition by key order by value range 1 PRECEDING) c, avg(value) over (partition by key order by value range between unbounded preceding and unbounded following) d, sum(value) over (partition by key order by value range between unbounded preceding and current row) e, avg(c_float) over (partition by key order by value range between 1 preceding and unbounded following) f, sum(c_float) over (partition by key order by value range between 1 preceding and current row) g, max(c_float) over (partition by key order by value range between 1 preceding and unbounded following) h, min(c_float) over (partition by key order by value range between 1 preceding and 1 following) i from t1) t1;
 
+create view v1 as select c_int, value, c_boolean from t1;
+create view v2 as select c_int, value from t2;
+
+select value from v1 where c_boolean=false;
+select max(c_int) from v1 group by (c_boolean);
+
+select count(v1.c_int)  from v1 join t2 on v1.c_int = t2.c_int;
+select count(v1.c_int)  from v1 join v2 on v1.c_int = v2.c_int;
+
+create view v3 as select v1.value  from v1 join t1 on v1.c_boolean = t1.c_boolean;
+select * from v3 limit 3;
 
 

Modified: hive/branches/cbo/ql/src/test/results/clientpositive/cbo_correctness.q.out
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/results/clientpositive/cbo_correctness.q.out?rev=1616107&r1=1616106&r2=1616107&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/results/clientpositive/cbo_correctness.q.out (original)
+++ hive/branches/cbo/ql/src/test/results/clientpositive/cbo_correctness.q.out Wed Aug  6 06:41:55 2014
@@ -15946,3 +15946,94 @@ POSTHOOK: Input: default@t1
 1.0	1	1.0	1	2	1.0	2.0	1.0	2.0	1	2
 NULL	NULL	NULL	NULL	0	NULL	0.0	NULL	NULL	NULL	NULL
 NULL	NULL	NULL	NULL	0	NULL	0.0	NULL	NULL	NULL	NULL
+PREHOOK: query: create view v1 as select c_int, value, c_boolean from t1
+PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@t1
+POSTHOOK: query: create view v1 as select c_int, value, c_boolean from t1
+POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@t1
+POSTHOOK: Output: default@v1
+PREHOOK: query: create view v2 as select c_int, value from t2
+PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@t2
+POSTHOOK: query: create view v2 as select c_int, value from t2
+POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@t2
+POSTHOOK: Output: default@v2
+PREHOOK: query: select value from v1 where c_boolean=false
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t1
+PREHOOK: Input: default@v1
+#### A masked pattern was here ####
+POSTHOOK: query: select value from v1 where c_boolean=false
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1
+POSTHOOK: Input: default@v1
+#### A masked pattern was here ####
+1
+1
+PREHOOK: query: select max(c_int) from v1 group by (c_boolean)
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t1
+PREHOOK: Input: default@v1
+#### A masked pattern was here ####
+POSTHOOK: query: select max(c_int) from v1 group by (c_boolean)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1
+POSTHOOK: Input: default@v1
+#### A masked pattern was here ####
+NULL
+1
+1
+PREHOOK: query: select count(v1.c_int)  from v1 join t2 on v1.c_int = t2.c_int
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t1
+PREHOOK: Input: default@t2
+PREHOOK: Input: default@v1
+#### A masked pattern was here ####
+POSTHOOK: query: select count(v1.c_int)  from v1 join t2 on v1.c_int = t2.c_int
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1
+POSTHOOK: Input: default@t2
+POSTHOOK: Input: default@v1
+#### A masked pattern was here ####
+234
+PREHOOK: query: select count(v1.c_int)  from v1 join v2 on v1.c_int = v2.c_int
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t1
+PREHOOK: Input: default@t2
+PREHOOK: Input: default@v1
+PREHOOK: Input: default@v2
+#### A masked pattern was here ####
+POSTHOOK: query: select count(v1.c_int)  from v1 join v2 on v1.c_int = v2.c_int
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1
+POSTHOOK: Input: default@t2
+POSTHOOK: Input: default@v1
+POSTHOOK: Input: default@v2
+#### A masked pattern was here ####
+234
+PREHOOK: query: create view v3 as select v1.value  from v1 join t1 on v1.c_boolean = t1.c_boolean
+PREHOOK: type: CREATEVIEW
+PREHOOK: Input: default@t1
+PREHOOK: Input: default@v1
+POSTHOOK: query: create view v3 as select v1.value  from v1 join t1 on v1.c_boolean = t1.c_boolean
+POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: default@t1
+POSTHOOK: Input: default@v1
+POSTHOOK: Output: default@v3
+PREHOOK: query: select * from v3 limit 3
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t1
+PREHOOK: Input: default@v1
+PREHOOK: Input: default@v3
+#### A masked pattern was here ####
+POSTHOOK: query: select * from v3 limit 3
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1
+POSTHOOK: Input: default@v1
+POSTHOOK: Input: default@v3
+#### A masked pattern was here ####
+1
+1
+1