You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by se...@apache.org on 2014/12/16 20:37:24 UTC
svn commit: r1646056 - in /hive/branches/branch-0.14/ql/src/test:
queries/clientpositive/cbo_correctness.q
results/clientpositive/cbo_correctness.q.out
results/clientpositive/tez/cbo_correctness.q.out
Author: sershe
Date: Tue Dec 16 19:37:23 2014
New Revision: 1646056
URL: http://svn.apache.org/r1646056
Log:
HIVE-9114 : union all query in cbo test has undefined ordering (Sergey Shelukhin, reviewed by Ashutosh Chauhan)
Modified:
hive/branches/branch-0.14/ql/src/test/queries/clientpositive/cbo_correctness.q
hive/branches/branch-0.14/ql/src/test/results/clientpositive/cbo_correctness.q.out
hive/branches/branch-0.14/ql/src/test/results/clientpositive/tez/cbo_correctness.q.out
Modified: hive/branches/branch-0.14/ql/src/test/queries/clientpositive/cbo_correctness.q
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.14/ql/src/test/queries/clientpositive/cbo_correctness.q?rev=1646056&r1=1646055&r2=1646056&view=diff
==============================================================================
--- hive/branches/branch-0.14/ql/src/test/queries/clientpositive/cbo_correctness.q (original)
+++ hive/branches/branch-0.14/ql/src/test/queries/clientpositive/cbo_correctness.q Tue Dec 16 19:37:23 2014
@@ -251,7 +251,12 @@ drop view v3;
drop view v4;
-- 11. Union All
-select * from t1 order by key, c_boolean, value, dt union all select * from t2 order by key, c_boolean, value, dt;
+select * from (
+select * from t1 order by key, c_boolean, value, c_int, c_float, dt
+union all
+select * from t2 order by key, c_boolean, value, c_int, c_float, dt) a
+order by key, c_boolean, value, c_int, c_float, dt;
+
select key from (select key, c_int from (select * from t1 union all select * from t2 where t2.key >=0)r1 union all select key, c_int from t3)r2 where key >=0 order by key;
select r2.key from (select key, c_int from (select key, c_int from t1 union all select key, c_int from t3 )r1 union all select key, c_int from t3)r2 join (select key, c_int from (select * from t1 union all select * from t2 where t2.key >=0)r1 union all select key, c_int from t3)r3 on r2.key=r3.key where r3.key >=0 order by r2.key;
Modified: hive/branches/branch-0.14/ql/src/test/results/clientpositive/cbo_correctness.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.14/ql/src/test/results/clientpositive/cbo_correctness.q.out?rev=1646056&r1=1646055&r2=1646056&view=diff
==============================================================================
--- hive/branches/branch-0.14/ql/src/test/results/clientpositive/cbo_correctness.q.out (original)
+++ hive/branches/branch-0.14/ql/src/test/results/clientpositive/cbo_correctness.q.out Tue Dec 16 19:37:23 2014
@@ -16719,7 +16719,11 @@ POSTHOOK: type: DROPVIEW
POSTHOOK: Input: default@v4
POSTHOOK: Output: default@v4
PREHOOK: query: -- 11. Union All
-select * from t1 order by key, c_boolean, value, dt union all select * from t2 order by key, c_boolean, value, dt
+select * from (
+select * from t1 order by key, c_boolean, value, c_int, c_float, dt
+union all
+select * from t2 order by key, c_boolean, value, c_int, c_float, dt) a
+order by key, c_boolean, value, c_int, c_float, dt
PREHOOK: type: QUERY
PREHOOK: Input: default@t1
PREHOOK: Input: default@t1@dt=2014
@@ -16727,7 +16731,11 @@ PREHOOK: Input: default@t2
PREHOOK: Input: default@t2@dt=2014
#### A masked pattern was here ####
POSTHOOK: query: -- 11. Union All
-select * from t1 order by key, c_boolean, value, dt union all select * from t2 order by key, c_boolean, value, dt
+select * from (
+select * from t1 order by key, c_boolean, value, c_int, c_float, dt
+union all
+select * from t2 order by key, c_boolean, value, c_int, c_float, dt) a
+order by key, c_boolean, value, c_int, c_float, dt
POSTHOOK: type: QUERY
POSTHOOK: Input: default@t1
POSTHOOK: Input: default@t1@dt=2014
@@ -16736,8 +16744,14 @@ POSTHOOK: Input: default@t2@dt=2014
#### A masked pattern was here ####
1 1 1 1.0 true 2014
1 1 1 1.0 true 2014
+ 1 1 1 1.0 true 2014
+ 1 1 1 1.0 true 2014
+ 1 1 1 1.0 true 2014
1 1 1 1.0 true 2014
1 1 1 1.0 true 2014
+ 1 1 1 1.0 true 2014
+1 1 1 1.0 false 2014
+1 1 1 1.0 false 2014
1 1 1 1.0 false 2014
1 1 1 1.0 false 2014
1 1 1 1.0 true 2014
@@ -16750,16 +16764,6 @@ POSTHOOK: Input: default@t2@dt=2014
1 1 1 1.0 true 2014
1 1 1 1.0 true 2014
1 1 1 1.0 true 2014
-1 1 1 1.0 true 2014
-1 1 1 1.0 true 2014
-null null NULL NULL NULL 2014
-null null NULL NULL NULL 2014
- 1 1 1 1.0 true 2014
- 1 1 1 1.0 true 2014
- 1 1 1 1.0 true 2014
- 1 1 1 1.0 true 2014
-1 1 1 1.0 false 2014
-1 1 1 1.0 false 2014
1 1 1 1.0 true 2014
1 1 1 1.0 true 2014
1 1 1 1.0 true 2014
@@ -16767,6 +16771,8 @@ null null NULL NULL NULL 2014
1 1 1 1.0 true 2014
1 1 1 1.0 true 2014
1 1 1 1.0 true 2014
+1 1 1 1.0 true 2014
+1 1 1 1.0 true 2014
2 2 2 2.0 true 2014
2 2 2 2.0 true 2014
2 2 2 2.0 true 2014
@@ -16774,6 +16780,8 @@ null null NULL NULL NULL 2014
2 2 2 2.0 true 2014
null null NULL NULL NULL 2014
null null NULL NULL NULL 2014
+null null NULL NULL NULL 2014
+null null NULL NULL NULL 2014
PREHOOK: query: select key from (select key, c_int from (select * from t1 union all select * from t2 where t2.key >=0)r1 union all select key, c_int from t3)r2 where key >=0 order by key
PREHOOK: type: QUERY
PREHOOK: Input: default@t1
Modified: hive/branches/branch-0.14/ql/src/test/results/clientpositive/tez/cbo_correctness.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.14/ql/src/test/results/clientpositive/tez/cbo_correctness.q.out?rev=1646056&r1=1646055&r2=1646056&view=diff
==============================================================================
--- hive/branches/branch-0.14/ql/src/test/results/clientpositive/tez/cbo_correctness.q.out (original)
+++ hive/branches/branch-0.14/ql/src/test/results/clientpositive/tez/cbo_correctness.q.out Tue Dec 16 19:37:23 2014
@@ -16719,7 +16719,11 @@ POSTHOOK: type: DROPVIEW
POSTHOOK: Input: default@v4
POSTHOOK: Output: default@v4
PREHOOK: query: -- 11. Union All
-select * from t1 order by key, c_boolean, value, dt union all select * from t2 order by key, c_boolean, value, dt
+select * from (
+select * from t1 order by key, c_boolean, value, c_int, c_float, dt
+union all
+select * from t2 order by key, c_boolean, value, c_int, c_float, dt) a
+order by key, c_boolean, value, c_int, c_float, dt
PREHOOK: type: QUERY
PREHOOK: Input: default@t1
PREHOOK: Input: default@t1@dt=2014
@@ -16727,7 +16731,11 @@ PREHOOK: Input: default@t2
PREHOOK: Input: default@t2@dt=2014
#### A masked pattern was here ####
POSTHOOK: query: -- 11. Union All
-select * from t1 order by key, c_boolean, value, dt union all select * from t2 order by key, c_boolean, value, dt
+select * from (
+select * from t1 order by key, c_boolean, value, c_int, c_float, dt
+union all
+select * from t2 order by key, c_boolean, value, c_int, c_float, dt) a
+order by key, c_boolean, value, c_int, c_float, dt
POSTHOOK: type: QUERY
POSTHOOK: Input: default@t1
POSTHOOK: Input: default@t1@dt=2014
@@ -16736,8 +16744,14 @@ POSTHOOK: Input: default@t2@dt=2014
#### A masked pattern was here ####
1 1 1 1.0 true 2014
1 1 1 1.0 true 2014
+ 1 1 1 1.0 true 2014
+ 1 1 1 1.0 true 2014
+ 1 1 1 1.0 true 2014
1 1 1 1.0 true 2014
1 1 1 1.0 true 2014
+ 1 1 1 1.0 true 2014
+1 1 1 1.0 false 2014
+1 1 1 1.0 false 2014
1 1 1 1.0 false 2014
1 1 1 1.0 false 2014
1 1 1 1.0 true 2014
@@ -16750,16 +16764,6 @@ POSTHOOK: Input: default@t2@dt=2014
1 1 1 1.0 true 2014
1 1 1 1.0 true 2014
1 1 1 1.0 true 2014
-1 1 1 1.0 true 2014
-1 1 1 1.0 true 2014
-null null NULL NULL NULL 2014
-null null NULL NULL NULL 2014
- 1 1 1 1.0 true 2014
- 1 1 1 1.0 true 2014
- 1 1 1 1.0 true 2014
- 1 1 1 1.0 true 2014
-1 1 1 1.0 false 2014
-1 1 1 1.0 false 2014
1 1 1 1.0 true 2014
1 1 1 1.0 true 2014
1 1 1 1.0 true 2014
@@ -16767,6 +16771,8 @@ null null NULL NULL NULL 2014
1 1 1 1.0 true 2014
1 1 1 1.0 true 2014
1 1 1 1.0 true 2014
+1 1 1 1.0 true 2014
+1 1 1 1.0 true 2014
2 2 2 2.0 true 2014
2 2 2 2.0 true 2014
2 2 2 2.0 true 2014
@@ -16774,6 +16780,8 @@ null null NULL NULL NULL 2014
2 2 2 2.0 true 2014
null null NULL NULL NULL 2014
null null NULL NULL NULL 2014
+null null NULL NULL NULL 2014
+null null NULL NULL NULL 2014
PREHOOK: query: select key from (select key, c_int from (select * from t1 union all select * from t2 where t2.key >=0)r1 union all select key, c_int from t3)r2 where key >=0 order by key
PREHOOK: type: QUERY
PREHOOK: Input: default@t1