hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1598678 [31/31] - in /hive/trunk: cli/src/java/org/apache/hadoop/hive/cli/ common/src/java/org/apache/hadoop/hive/common/io/ itests/util/src/main/java/org/apache/hadoop/hive/ql/ ql/src/java/org/apache/hadoop/hive/ql/ ql/src/java/org/apache...
Date Fri, 30 May 2014 17:37:15 GMT
Modified: hive/trunk/ql/src/test/results/clientpositive/tez/subquery_in.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/tez/subquery_in.q.out?rev=1598678&r1=1598677&r2=1598678&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/tez/subquery_in.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/tez/subquery_in.q.out Fri May 30 17:37:05 2014
@@ -1,6 +1,10 @@
-PREHOOK: query: DROP TABLE part
+PREHOOK: query: -- SORT_QUERY_RESULTS
+
+DROP TABLE part
 PREHOOK: type: DROPTABLE
-POSTHOOK: query: DROP TABLE part
+POSTHOOK: query: -- SORT_QUERY_RESULTS
+
+DROP TABLE part
 POSTHOOK: type: DROPTABLE
 PREHOOK: query: -- data setup
 CREATE TABLE part( 
@@ -182,14 +186,12 @@ STAGE PLANS:
 PREHOOK: query: select * 
 from src 
 where src.key in (select key from src s1 where s1.key > '9')
-order by key
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
 POSTHOOK: query: select * 
 from src 
 where src.key in (select key from src s1 where s1.key > '9')
-order by key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -306,7 +308,6 @@ where b.key in
          from src a 
          where b.value = a.value and a.key > '9'
         )
-order by b.key
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -317,7 +318,6 @@ where b.key in
          from src a 
          where b.value = a.value and a.key > '9'
         )
-order by b.key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -468,7 +468,6 @@ part where part.p_size in 
 	 from (select p_size, rank() over(partition by p_mfgr order by p_size) as r from part) a 
 	 where r <= 2
 	)
-order by p_name
 PREHOOK: type: QUERY
 PREHOOK: Input: default@part
 #### A masked pattern was here ####
@@ -479,7 +478,6 @@ part where part.p_size in 
 	 from (select p_size, rank() over(partition by p_mfgr order by p_size) as r from part) a 
 	 where r <= 2
 	)
-order by p_name
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
@@ -622,7 +620,6 @@ from part b where b.p_size in 
 	 from (select p_mfgr, p_size, rank() over(partition by p_mfgr order by p_size) as r from part) a 
 	 where r <= 2 and b.p_mfgr = a.p_mfgr
 	)
-order by p_mfgr, p_name, p_size
 PREHOOK: type: QUERY
 PREHOOK: Input: default@part
 #### A masked pattern was here ####
@@ -632,7 +629,6 @@ from part b where b.p_size in 
 	 from (select p_mfgr, p_size, rank() over(partition by p_mfgr order by p_size) as r from part) a 
 	 where r <= 2 and b.p_mfgr = a.p_mfgr
 	)
-order by p_mfgr, p_name, p_size
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
@@ -766,7 +762,6 @@ where b.key in
          from src a 
          where b.value = a.value and a.key > '9'
         )
-order by b.key
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -777,7 +772,6 @@ where b.key in
          from src a 
          where b.value = a.value and a.key > '9'
         )
-order by b.key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -797,7 +791,6 @@ select p_mfgr, p_name, p_size 
 from part 
 where part.p_size in 
   (select first_value(p_size) over(partition by p_mfgr order by p_size) from part)
-order by p_mfgr, p_name, p_size
 PREHOOK: type: QUERY
 PREHOOK: Input: default@part
 #### A masked pattern was here ####
@@ -806,7 +799,6 @@ select p_mfgr, p_name, p_size 
 from part 
 where part.p_size in 
   (select first_value(p_size) over(partition by p_mfgr order by p_size) from part)
-order by p_mfgr, p_name, p_size
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@part
 #### A masked pattern was here ####
@@ -963,7 +955,6 @@ PREHOOK: query: select p.p_partkey, li.l
 from (select distinct l_partkey as p_partkey from lineitem) p join lineitem li on p.p_partkey = li.l_partkey 
 where li.l_linenumber = 1 and
  li.l_orderkey in (select l_orderkey from lineitem where l_shipmode = 'AIR')
-order by p.p_partkey, li.l_suppkey
 PREHOOK: type: QUERY
 PREHOOK: Input: default@lineitem
 #### A masked pattern was here ####
@@ -971,26 +962,24 @@ POSTHOOK: query: select p.p_partkey, li.
 from (select distinct l_partkey as p_partkey from lineitem) p join lineitem li on p.p_partkey = li.l_partkey 
 where li.l_linenumber = 1 and
  li.l_orderkey in (select l_orderkey from lineitem where l_shipmode = 'AIR')
-order by p.p_partkey, li.l_suppkey
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@lineitem
 #### A masked pattern was here ####
+108570	8571
+115118	7630
+115209	7721
+155190	7706
 2320	9821
-4297	1798
 40216	217
+4297	1798
 61336	8855
 64128	9141
 82704	7721
-108570	8571
-115118	7630
-115209	7721
-155190	7706
 PREHOOK: query: -- non agg, corr, with join in Parent Query
 select p.p_partkey, li.l_suppkey 
 from (select distinct l_partkey as p_partkey from lineitem) p join lineitem li on p.p_partkey = li.l_partkey 
 where li.l_linenumber = 1 and
  li.l_orderkey in (select l_orderkey from lineitem where l_shipmode = 'AIR' and l_linenumber = li.l_linenumber)
-order by p.p_partkey, li.l_suppkey
 PREHOOK: type: QUERY
 PREHOOK: Input: default@lineitem
 #### A masked pattern was here ####
@@ -999,9 +988,8 @@ select p.p_partkey, li.l_suppkey 
 from (select distinct l_partkey as p_partkey from lineitem) p join lineitem li on p.p_partkey = li.l_partkey 
 where li.l_linenumber = 1 and
  li.l_orderkey in (select l_orderkey from lineitem where l_shipmode = 'AIR' and l_linenumber = li.l_linenumber)
-order by p.p_partkey, li.l_suppkey
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@lineitem
 #### A masked pattern was here ####
-4297	1798
 108570	8571
+4297	1798

Modified: hive/trunk/ql/src/test/results/clientpositive/tez/tez_dml.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/tez/tez_dml.q.out?rev=1598678&r1=1598677&r2=1598678&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/tez/tez_dml.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/tez/tez_dml.q.out Fri May 30 17:37:05 2014
@@ -859,10 +859,10 @@ POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
   Stage-2 is a root stage
   Stage-3 depends on stages: Stage-2
-  Stage-0 depends on stages: Stage-3
-  Stage-4 depends on stages: Stage-0
   Stage-1 depends on stages: Stage-3
-  Stage-5 depends on stages: Stage-1
+  Stage-4 depends on stages: Stage-1
+  Stage-0 depends on stages: Stage-3
+  Stage-5 depends on stages: Stage-0
 
 STAGE PLANS:
   Stage: Stage-2
@@ -908,7 +908,7 @@ STAGE PLANS:
   Stage: Stage-3
     Dependency Collection
 
-  Stage: Stage-0
+  Stage: Stage-1
     Move Operator
       tables:
           replace: false
@@ -916,12 +916,12 @@ STAGE PLANS:
               input format: org.apache.hadoop.mapred.TextInputFormat
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-              name: default.even
+              name: default.odd
 
   Stage: Stage-4
     Stats-Aggr Operator
 
-  Stage: Stage-1
+  Stage: Stage-0
     Move Operator
       tables:
           replace: false
@@ -929,7 +929,7 @@ STAGE PLANS:
               input format: org.apache.hadoop.mapred.TextInputFormat
               output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
               serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-              name: default.odd
+              name: default.even
 
   Stage: Stage-5
     Stats-Aggr Operator

Modified: hive/trunk/ql/src/test/results/clientpositive/union22.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/union22.q.out?rev=1598678&r1=1598677&r2=1598678&view=diff
==============================================================================
Files hive/trunk/ql/src/test/results/clientpositive/union22.q.out (original) and hive/trunk/ql/src/test/results/clientpositive/union22.q.out Fri May 30 17:37:05 2014 differ

Modified: hive/trunk/ql/src/test/results/clientpositive/union24.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/union24.q.out?rev=1598678&r1=1598677&r2=1598678&view=diff
==============================================================================
Files hive/trunk/ql/src/test/results/clientpositive/union24.q.out (original) and hive/trunk/ql/src/test/results/clientpositive/union24.q.out Fri May 30 17:37:05 2014 differ

Modified: hive/trunk/ql/src/test/results/clientpositive/union26.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/union26.q.out?rev=1598678&r1=1598677&r2=1598678&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/union26.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/union26.q.out Fri May 30 17:37:05 2014
@@ -1,4 +1,6 @@
-PREHOOK: query: EXPLAIN 
+PREHOOK: query: -- SORT_QUERY_RESULTS
+
+EXPLAIN
 SELECT 
 count(1) as counts,
 key,
@@ -20,7 +22,9 @@ WHERE ds='2008-04-08' and hr='11'
 ) a
 group by key, value
 PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN 
+POSTHOOK: query: -- SORT_QUERY_RESULTS
+
+EXPLAIN
 SELECT 
 count(1) as counts,
 key,
@@ -220,7 +224,7 @@ select key, value 
 FROM srcpart LATERAL VIEW explode(array(1,2,3)) myTable AS myCol
 WHERE ds='2008-04-08' and hr='11'
 ) a
-group by key, value order by key, value
+group by key, value
 PREHOOK: type: QUERY
 PREHOOK: Input: default@srcpart
 PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
@@ -245,44 +249,157 @@ select key, value 
 FROM srcpart LATERAL VIEW explode(array(1,2,3)) myTable AS myCol
 WHERE ds='2008-04-08' and hr='11'
 ) a
-group by key, value order by key, value
+group by key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@srcpart
 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
 #### A masked pattern was here ####
-18	0	val_0
-4	10	val_10
 10	100	val_100
 10	103	val_103
 10	104	val_104
-4	105	val_105
-4	11	val_11
-4	111	val_111
 10	113	val_113
-4	114	val_114
-4	116	val_116
 10	118	val_118
-18	119	val_119
 10	12	val_12
 10	120	val_120
 10	125	val_125
-4	126	val_126
-18	128	val_128
 10	129	val_129
-4	131	val_131
-4	133	val_133
 10	134	val_134
-4	136	val_136
 10	137	val_137
-28	138	val_138
-4	143	val_143
-4	145	val_145
 10	146	val_146
 10	149	val_149
 10	15	val_15
-4	150	val_150
 10	152	val_152
+10	164	val_164
+10	165	val_165
+10	172	val_172
+10	174	val_174
+10	175	val_175
+10	176	val_176
+10	179	val_179
+10	18	val_18
+10	191	val_191
+10	195	val_195
+10	197	val_197
+10	200	val_200
+10	203	val_203
+10	205	val_205
+10	207	val_207
+10	209	val_209
+10	213	val_213
+10	216	val_216
+10	217	val_217
+10	219	val_219
+10	221	val_221
+10	223	val_223
+10	224	val_224
+10	229	val_229
+10	233	val_233
+10	237	val_237
+10	238	val_238
+10	239	val_239
+10	24	val_24
+10	242	val_242
+10	255	val_255
+10	256	val_256
+10	26	val_26
+10	265	val_265
+10	272	val_272
+10	278	val_278
+10	280	val_280
+10	281	val_281
+10	282	val_282
+10	288	val_288
+10	307	val_307
+10	309	val_309
+10	317	val_317
+10	321	val_321
+10	322	val_322
+10	325	val_325
+10	331	val_331
+10	333	val_333
+10	342	val_342
+10	344	val_344
+10	353	val_353
+10	367	val_367
+10	37	val_37
+10	382	val_382
+10	395	val_395
+10	397	val_397
+10	399	val_399
+10	404	val_404
+10	413	val_413
+10	414	val_414
+10	42	val_42
+10	424	val_424
+10	429	val_429
+10	439	val_439
+10	458	val_458
+10	459	val_459
+10	462	val_462
+10	463	val_463
+10	478	val_478
+10	492	val_492
+10	51	val_51
+10	58	val_58
+10	67	val_67
+10	72	val_72
+10	76	val_76
+10	83	val_83
+10	84	val_84
+10	95	val_95
+10	97	val_97
+10	98	val_98
+18	0	val_0
+18	119	val_119
+18	128	val_128
+18	167	val_167
+18	187	val_187
+18	193	val_193
+18	199	val_199
+18	208	val_208
+18	273	val_273
+18	298	val_298
+18	311	val_311
+18	316	val_316
+18	318	val_318
+18	327	val_327
+18	35	val_35
+18	369	val_369
+18	384	val_384
+18	396	val_396
+18	403	val_403
+18	409	val_409
+18	417	val_417
+18	430	val_430
+18	431	val_431
+18	438	val_438
+18	454	val_454
+18	466	val_466
+18	480	val_480
+18	498	val_498
+18	5	val_5
+18	70	val_70
+18	90	val_90
+28	138	val_138
+28	169	val_169
+28	277	val_277
+28	406	val_406
+28	468	val_468
+28	489	val_489
+4	10	val_10
+4	105	val_105
+4	11	val_11
+4	111	val_111
+4	114	val_114
+4	116	val_116
+4	126	val_126
+4	131	val_131
+4	133	val_133
+4	136	val_136
+4	143	val_143
+4	145	val_145
+4	150	val_150
 4	153	val_153
 4	155	val_155
 4	156	val_156
@@ -291,199 +408,108 @@ POSTHOOK: Input: default@srcpart@ds=2008
 4	160	val_160
 4	162	val_162
 4	163	val_163
-10	164	val_164
-10	165	val_165
 4	166	val_166
-18	167	val_167
 4	168	val_168
-28	169	val_169
 4	17	val_17
 4	170	val_170
-10	172	val_172
-10	174	val_174
-10	175	val_175
-10	176	val_176
 4	177	val_177
 4	178	val_178
-10	179	val_179
-10	18	val_18
 4	180	val_180
 4	181	val_181
 4	183	val_183
 4	186	val_186
-18	187	val_187
 4	189	val_189
 4	19	val_19
 4	190	val_190
-10	191	val_191
 4	192	val_192
-18	193	val_193
 4	194	val_194
-10	195	val_195
 4	196	val_196
-10	197	val_197
-18	199	val_199
 4	2	val_2
 4	20	val_20
-10	200	val_200
 4	201	val_201
 4	202	val_202
-10	203	val_203
-10	205	val_205
-10	207	val_207
-18	208	val_208
-10	209	val_209
-10	213	val_213
 4	214	val_214
-10	216	val_216
-10	217	val_217
 4	218	val_218
-10	219	val_219
-10	221	val_221
 4	222	val_222
-10	223	val_223
-10	224	val_224
 4	226	val_226
 4	228	val_228
-10	229	val_229
-40	230	val_230
-10	233	val_233
 4	235	val_235
-10	237	val_237
-10	238	val_238
-10	239	val_239
-10	24	val_24
 4	241	val_241
-10	242	val_242
 4	244	val_244
 4	247	val_247
 4	248	val_248
 4	249	val_249
 4	252	val_252
-10	255	val_255
-10	256	val_256
 4	257	val_257
 4	258	val_258
-10	26	val_26
 4	260	val_260
 4	262	val_262
 4	263	val_263
-10	265	val_265
 4	266	val_266
 4	27	val_27
-10	272	val_272
-18	273	val_273
 4	274	val_274
 4	275	val_275
-28	277	val_277
-10	278	val_278
 4	28	val_28
-10	280	val_280
-10	281	val_281
-10	282	val_282
 4	283	val_283
 4	284	val_284
 4	285	val_285
 4	286	val_286
 4	287	val_287
-10	288	val_288
 4	289	val_289
 4	291	val_291
 4	292	val_292
 4	296	val_296
-18	298	val_298
 4	30	val_30
 4	302	val_302
 4	305	val_305
 4	306	val_306
-10	307	val_307
 4	308	val_308
-10	309	val_309
 4	310	val_310
-18	311	val_311
 4	315	val_315
-18	316	val_316
-10	317	val_317
-18	318	val_318
-10	321	val_321
-10	322	val_322
 4	323	val_323
-10	325	val_325
-18	327	val_327
 4	33	val_33
-10	331	val_331
 4	332	val_332
-10	333	val_333
 4	335	val_335
 4	336	val_336
 4	338	val_338
 4	339	val_339
 4	34	val_34
 4	341	val_341
-10	342	val_342
-10	344	val_344
 4	345	val_345
-40	348	val_348
-18	35	val_35
 4	351	val_351
-10	353	val_353
 4	356	val_356
 4	360	val_360
 4	362	val_362
 4	364	val_364
 4	365	val_365
 4	366	val_366
-10	367	val_367
 4	368	val_368
-18	369	val_369
-10	37	val_37
 4	373	val_373
 4	374	val_374
 4	375	val_375
 4	377	val_377
 4	378	val_378
 4	379	val_379
-10	382	val_382
-18	384	val_384
 4	386	val_386
 4	389	val_389
 4	392	val_392
 4	393	val_393
 4	394	val_394
-10	395	val_395
-18	396	val_396
-10	397	val_397
-10	399	val_399
 4	4	val_4
 4	400	val_400
-40	401	val_401
 4	402	val_402
-18	403	val_403
-10	404	val_404
-28	406	val_406
 4	407	val_407
-18	409	val_409
 4	41	val_41
 4	411	val_411
-10	413	val_413
-10	414	val_414
-18	417	val_417
 4	418	val_418
 4	419	val_419
-10	42	val_42
 4	421	val_421
-10	424	val_424
 4	427	val_427
-10	429	val_429
 4	43	val_43
-18	430	val_430
-18	431	val_431
 4	432	val_432
 4	435	val_435
 4	436	val_436
 4	437	val_437
-18	438	val_438
-10	439	val_439
 4	44	val_44
 4	443	val_443
 4	444	val_444
@@ -492,74 +518,52 @@ POSTHOOK: Input: default@srcpart@ds=2008
 4	449	val_449
 4	452	val_452
 4	453	val_453
-18	454	val_454
 4	455	val_455
 4	457	val_457
-10	458	val_458
-10	459	val_459
 4	460	val_460
-10	462	val_462
-10	463	val_463
-18	466	val_466
 4	467	val_467
-28	468	val_468
-40	469	val_469
 4	47	val_47
 4	470	val_470
 4	472	val_472
 4	475	val_475
 4	477	val_477
-10	478	val_478
 4	479	val_479
-18	480	val_480
 4	481	val_481
 4	482	val_482
 4	483	val_483
 4	484	val_484
 4	485	val_485
 4	487	val_487
-28	489	val_489
 4	490	val_490
 4	491	val_491
-10	492	val_492
 4	493	val_493
 4	494	val_494
 4	495	val_495
 4	496	val_496
 4	497	val_497
-18	498	val_498
-18	5	val_5
-10	51	val_51
 4	53	val_53
 4	54	val_54
 4	57	val_57
-10	58	val_58
 4	64	val_64
 4	65	val_65
 4	66	val_66
-10	67	val_67
 4	69	val_69
-18	70	val_70
-10	72	val_72
 4	74	val_74
-10	76	val_76
 4	77	val_77
 4	78	val_78
 4	8	val_8
 4	80	val_80
 4	82	val_82
-10	83	val_83
-10	84	val_84
 4	85	val_85
 4	86	val_86
 4	87	val_87
 4	9	val_9
-18	90	val_90
 4	92	val_92
-10	95	val_95
 4	96	val_96
-10	97	val_97
-10	98	val_98
+40	230	val_230
+40	348	val_348
+40	401	val_401
+40	469	val_469
 PREHOOK: query: SELECT 
 count(1) as counts,
 key,
@@ -610,38 +614,151 @@ POSTHOOK: Input: default@srcpart
 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
 #### A masked pattern was here ####
-18	0	val_0
-4	10	val_10
 10	100	val_100
 10	103	val_103
 10	104	val_104
-4	105	val_105
-4	11	val_11
-4	111	val_111
 10	113	val_113
-4	114	val_114
-4	116	val_116
 10	118	val_118
-18	119	val_119
 10	12	val_12
 10	120	val_120
 10	125	val_125
-4	126	val_126
-18	128	val_128
 10	129	val_129
-4	131	val_131
-4	133	val_133
 10	134	val_134
-4	136	val_136
 10	137	val_137
-28	138	val_138
-4	143	val_143
-4	145	val_145
 10	146	val_146
 10	149	val_149
 10	15	val_15
-4	150	val_150
 10	152	val_152
+10	164	val_164
+10	165	val_165
+10	172	val_172
+10	174	val_174
+10	175	val_175
+10	176	val_176
+10	179	val_179
+10	18	val_18
+10	191	val_191
+10	195	val_195
+10	197	val_197
+10	200	val_200
+10	203	val_203
+10	205	val_205
+10	207	val_207
+10	209	val_209
+10	213	val_213
+10	216	val_216
+10	217	val_217
+10	219	val_219
+10	221	val_221
+10	223	val_223
+10	224	val_224
+10	229	val_229
+10	233	val_233
+10	237	val_237
+10	238	val_238
+10	239	val_239
+10	24	val_24
+10	242	val_242
+10	255	val_255
+10	256	val_256
+10	26	val_26
+10	265	val_265
+10	272	val_272
+10	278	val_278
+10	280	val_280
+10	281	val_281
+10	282	val_282
+10	288	val_288
+10	307	val_307
+10	309	val_309
+10	317	val_317
+10	321	val_321
+10	322	val_322
+10	325	val_325
+10	331	val_331
+10	333	val_333
+10	342	val_342
+10	344	val_344
+10	353	val_353
+10	367	val_367
+10	37	val_37
+10	382	val_382
+10	395	val_395
+10	397	val_397
+10	399	val_399
+10	404	val_404
+10	413	val_413
+10	414	val_414
+10	42	val_42
+10	424	val_424
+10	429	val_429
+10	439	val_439
+10	458	val_458
+10	459	val_459
+10	462	val_462
+10	463	val_463
+10	478	val_478
+10	492	val_492
+10	51	val_51
+10	58	val_58
+10	67	val_67
+10	72	val_72
+10	76	val_76
+10	83	val_83
+10	84	val_84
+10	95	val_95
+10	97	val_97
+10	98	val_98
+18	0	val_0
+18	119	val_119
+18	128	val_128
+18	167	val_167
+18	187	val_187
+18	193	val_193
+18	199	val_199
+18	208	val_208
+18	273	val_273
+18	298	val_298
+18	311	val_311
+18	316	val_316
+18	318	val_318
+18	327	val_327
+18	35	val_35
+18	369	val_369
+18	384	val_384
+18	396	val_396
+18	403	val_403
+18	409	val_409
+18	417	val_417
+18	430	val_430
+18	431	val_431
+18	438	val_438
+18	454	val_454
+18	466	val_466
+18	480	val_480
+18	498	val_498
+18	5	val_5
+18	70	val_70
+18	90	val_90
+28	138	val_138
+28	169	val_169
+28	277	val_277
+28	406	val_406
+28	468	val_468
+28	489	val_489
+4	10	val_10
+4	105	val_105
+4	11	val_11
+4	111	val_111
+4	114	val_114
+4	116	val_116
+4	126	val_126
+4	131	val_131
+4	133	val_133
+4	136	val_136
+4	143	val_143
+4	145	val_145
+4	150	val_150
 4	153	val_153
 4	155	val_155
 4	156	val_156
@@ -650,199 +767,108 @@ POSTHOOK: Input: default@srcpart@ds=2008
 4	160	val_160
 4	162	val_162
 4	163	val_163
-10	164	val_164
-10	165	val_165
 4	166	val_166
-18	167	val_167
 4	168	val_168
-28	169	val_169
 4	17	val_17
 4	170	val_170
-10	172	val_172
-10	174	val_174
-10	175	val_175
-10	176	val_176
 4	177	val_177
 4	178	val_178
-10	179	val_179
-10	18	val_18
 4	180	val_180
 4	181	val_181
 4	183	val_183
 4	186	val_186
-18	187	val_187
 4	189	val_189
 4	19	val_19
 4	190	val_190
-10	191	val_191
 4	192	val_192
-18	193	val_193
 4	194	val_194
-10	195	val_195
 4	196	val_196
-10	197	val_197
-18	199	val_199
 4	2	val_2
 4	20	val_20
-10	200	val_200
 4	201	val_201
 4	202	val_202
-10	203	val_203
-10	205	val_205
-10	207	val_207
-18	208	val_208
-10	209	val_209
-10	213	val_213
 4	214	val_214
-10	216	val_216
-10	217	val_217
 4	218	val_218
-10	219	val_219
-10	221	val_221
 4	222	val_222
-10	223	val_223
-10	224	val_224
 4	226	val_226
 4	228	val_228
-10	229	val_229
-40	230	val_230
-10	233	val_233
 4	235	val_235
-10	237	val_237
-10	238	val_238
-10	239	val_239
-10	24	val_24
 4	241	val_241
-10	242	val_242
 4	244	val_244
 4	247	val_247
 4	248	val_248
 4	249	val_249
 4	252	val_252
-10	255	val_255
-10	256	val_256
 4	257	val_257
 4	258	val_258
-10	26	val_26
 4	260	val_260
 4	262	val_262
 4	263	val_263
-10	265	val_265
 4	266	val_266
 4	27	val_27
-10	272	val_272
-18	273	val_273
 4	274	val_274
 4	275	val_275
-28	277	val_277
-10	278	val_278
 4	28	val_28
-10	280	val_280
-10	281	val_281
-10	282	val_282
 4	283	val_283
 4	284	val_284
 4	285	val_285
 4	286	val_286
 4	287	val_287
-10	288	val_288
 4	289	val_289
 4	291	val_291
 4	292	val_292
 4	296	val_296
-18	298	val_298
 4	30	val_30
 4	302	val_302
 4	305	val_305
 4	306	val_306
-10	307	val_307
 4	308	val_308
-10	309	val_309
 4	310	val_310
-18	311	val_311
 4	315	val_315
-18	316	val_316
-10	317	val_317
-18	318	val_318
-10	321	val_321
-10	322	val_322
 4	323	val_323
-10	325	val_325
-18	327	val_327
 4	33	val_33
-10	331	val_331
 4	332	val_332
-10	333	val_333
 4	335	val_335
 4	336	val_336
 4	338	val_338
 4	339	val_339
 4	34	val_34
 4	341	val_341
-10	342	val_342
-10	344	val_344
 4	345	val_345
-40	348	val_348
-18	35	val_35
 4	351	val_351
-10	353	val_353
 4	356	val_356
 4	360	val_360
 4	362	val_362
 4	364	val_364
 4	365	val_365
 4	366	val_366
-10	367	val_367
 4	368	val_368
-18	369	val_369
-10	37	val_37
 4	373	val_373
 4	374	val_374
 4	375	val_375
 4	377	val_377
 4	378	val_378
 4	379	val_379
-10	382	val_382
-18	384	val_384
 4	386	val_386
 4	389	val_389
 4	392	val_392
 4	393	val_393
 4	394	val_394
-10	395	val_395
-18	396	val_396
-10	397	val_397
-10	399	val_399
 4	4	val_4
 4	400	val_400
-40	401	val_401
 4	402	val_402
-18	403	val_403
-10	404	val_404
-28	406	val_406
 4	407	val_407
-18	409	val_409
 4	41	val_41
 4	411	val_411
-10	413	val_413
-10	414	val_414
-18	417	val_417
 4	418	val_418
 4	419	val_419
-10	42	val_42
 4	421	val_421
-10	424	val_424
 4	427	val_427
-10	429	val_429
 4	43	val_43
-18	430	val_430
-18	431	val_431
 4	432	val_432
 4	435	val_435
 4	436	val_436
 4	437	val_437
-18	438	val_438
-10	439	val_439
 4	44	val_44
 4	443	val_443
 4	444	val_444
@@ -851,74 +877,52 @@ POSTHOOK: Input: default@srcpart@ds=2008
 4	449	val_449
 4	452	val_452
 4	453	val_453
-18	454	val_454
 4	455	val_455
 4	457	val_457
-10	458	val_458
-10	459	val_459
 4	460	val_460
-10	462	val_462
-10	463	val_463
-18	466	val_466
 4	467	val_467
-28	468	val_468
-40	469	val_469
 4	47	val_47
 4	470	val_470
 4	472	val_472
 4	475	val_475
 4	477	val_477
-10	478	val_478
 4	479	val_479
-18	480	val_480
 4	481	val_481
 4	482	val_482
 4	483	val_483
 4	484	val_484
 4	485	val_485
 4	487	val_487
-28	489	val_489
 4	490	val_490
 4	491	val_491
-10	492	val_492
 4	493	val_493
 4	494	val_494
 4	495	val_495
 4	496	val_496
 4	497	val_497
-18	498	val_498
-18	5	val_5
-10	51	val_51
 4	53	val_53
 4	54	val_54
 4	57	val_57
-10	58	val_58
 4	64	val_64
 4	65	val_65
 4	66	val_66
-10	67	val_67
 4	69	val_69
-18	70	val_70
-10	72	val_72
 4	74	val_74
-10	76	val_76
 4	77	val_77
 4	78	val_78
 4	8	val_8
 4	80	val_80
 4	82	val_82
-10	83	val_83
-10	84	val_84
 4	85	val_85
 4	86	val_86
 4	87	val_87
 4	9	val_9
-18	90	val_90
 4	92	val_92
-10	95	val_95
 4	96	val_96
-10	97	val_97
-10	98	val_98
+40	230	val_230
+40	348	val_348
+40	401	val_401
+40	469	val_469
 PREHOOK: query: SELECT 
 count(1) as counts,
 key,
@@ -938,7 +942,7 @@ select key, value 
 FROM srcpart LATERAL VIEW explode(array(1,2,3)) myTable AS myCol
 WHERE ds='2008-04-08' and hr='11'
 ) a
-group by key, value order by key, value
+group by key, value
 PREHOOK: type: QUERY
 PREHOOK: Input: default@srcpart
 PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
@@ -963,44 +967,157 @@ select key, value 
 FROM srcpart LATERAL VIEW explode(array(1,2,3)) myTable AS myCol
 WHERE ds='2008-04-08' and hr='11'
 ) a
-group by key, value order by key, value
+group by key, value
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@srcpart
 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
 #### A masked pattern was here ####
-18	0	val_0
-4	10	val_10
 10	100	val_100
 10	103	val_103
 10	104	val_104
-4	105	val_105
-4	11	val_11
-4	111	val_111
 10	113	val_113
-4	114	val_114
-4	116	val_116
 10	118	val_118
-18	119	val_119
 10	12	val_12
 10	120	val_120
 10	125	val_125
-4	126	val_126
-18	128	val_128
 10	129	val_129
-4	131	val_131
-4	133	val_133
 10	134	val_134
-4	136	val_136
 10	137	val_137
-28	138	val_138
-4	143	val_143
-4	145	val_145
 10	146	val_146
 10	149	val_149
 10	15	val_15
-4	150	val_150
 10	152	val_152
+10	164	val_164
+10	165	val_165
+10	172	val_172
+10	174	val_174
+10	175	val_175
+10	176	val_176
+10	179	val_179
+10	18	val_18
+10	191	val_191
+10	195	val_195
+10	197	val_197
+10	200	val_200
+10	203	val_203
+10	205	val_205
+10	207	val_207
+10	209	val_209
+10	213	val_213
+10	216	val_216
+10	217	val_217
+10	219	val_219
+10	221	val_221
+10	223	val_223
+10	224	val_224
+10	229	val_229
+10	233	val_233
+10	237	val_237
+10	238	val_238
+10	239	val_239
+10	24	val_24
+10	242	val_242
+10	255	val_255
+10	256	val_256
+10	26	val_26
+10	265	val_265
+10	272	val_272
+10	278	val_278
+10	280	val_280
+10	281	val_281
+10	282	val_282
+10	288	val_288
+10	307	val_307
+10	309	val_309
+10	317	val_317
+10	321	val_321
+10	322	val_322
+10	325	val_325
+10	331	val_331
+10	333	val_333
+10	342	val_342
+10	344	val_344
+10	353	val_353
+10	367	val_367
+10	37	val_37
+10	382	val_382
+10	395	val_395
+10	397	val_397
+10	399	val_399
+10	404	val_404
+10	413	val_413
+10	414	val_414
+10	42	val_42
+10	424	val_424
+10	429	val_429
+10	439	val_439
+10	458	val_458
+10	459	val_459
+10	462	val_462
+10	463	val_463
+10	478	val_478
+10	492	val_492
+10	51	val_51
+10	58	val_58
+10	67	val_67
+10	72	val_72
+10	76	val_76
+10	83	val_83
+10	84	val_84
+10	95	val_95
+10	97	val_97
+10	98	val_98
+18	0	val_0
+18	119	val_119
+18	128	val_128
+18	167	val_167
+18	187	val_187
+18	193	val_193
+18	199	val_199
+18	208	val_208
+18	273	val_273
+18	298	val_298
+18	311	val_311
+18	316	val_316
+18	318	val_318
+18	327	val_327
+18	35	val_35
+18	369	val_369
+18	384	val_384
+18	396	val_396
+18	403	val_403
+18	409	val_409
+18	417	val_417
+18	430	val_430
+18	431	val_431
+18	438	val_438
+18	454	val_454
+18	466	val_466
+18	480	val_480
+18	498	val_498
+18	5	val_5
+18	70	val_70
+18	90	val_90
+28	138	val_138
+28	169	val_169
+28	277	val_277
+28	406	val_406
+28	468	val_468
+28	489	val_489
+4	10	val_10
+4	105	val_105
+4	11	val_11
+4	111	val_111
+4	114	val_114
+4	116	val_116
+4	126	val_126
+4	131	val_131
+4	133	val_133
+4	136	val_136
+4	143	val_143
+4	145	val_145
+4	150	val_150
 4	153	val_153
 4	155	val_155
 4	156	val_156
@@ -1009,199 +1126,108 @@ POSTHOOK: Input: default@srcpart@ds=2008
 4	160	val_160
 4	162	val_162
 4	163	val_163
-10	164	val_164
-10	165	val_165
 4	166	val_166
-18	167	val_167
 4	168	val_168
-28	169	val_169
 4	17	val_17
 4	170	val_170
-10	172	val_172
-10	174	val_174
-10	175	val_175
-10	176	val_176
 4	177	val_177
 4	178	val_178
-10	179	val_179
-10	18	val_18
 4	180	val_180
 4	181	val_181
 4	183	val_183
 4	186	val_186
-18	187	val_187
 4	189	val_189
 4	19	val_19
 4	190	val_190
-10	191	val_191
 4	192	val_192
-18	193	val_193
 4	194	val_194
-10	195	val_195
 4	196	val_196
-10	197	val_197
-18	199	val_199
 4	2	val_2
 4	20	val_20
-10	200	val_200
 4	201	val_201
 4	202	val_202
-10	203	val_203
-10	205	val_205
-10	207	val_207
-18	208	val_208
-10	209	val_209
-10	213	val_213
 4	214	val_214
-10	216	val_216
-10	217	val_217
 4	218	val_218
-10	219	val_219
-10	221	val_221
 4	222	val_222
-10	223	val_223
-10	224	val_224
 4	226	val_226
 4	228	val_228
-10	229	val_229
-40	230	val_230
-10	233	val_233
 4	235	val_235
-10	237	val_237
-10	238	val_238
-10	239	val_239
-10	24	val_24
 4	241	val_241
-10	242	val_242
 4	244	val_244
 4	247	val_247
 4	248	val_248
 4	249	val_249
 4	252	val_252
-10	255	val_255
-10	256	val_256
 4	257	val_257
 4	258	val_258
-10	26	val_26
 4	260	val_260
 4	262	val_262
 4	263	val_263
-10	265	val_265
 4	266	val_266
 4	27	val_27
-10	272	val_272
-18	273	val_273
 4	274	val_274
 4	275	val_275
-28	277	val_277
-10	278	val_278
 4	28	val_28
-10	280	val_280
-10	281	val_281
-10	282	val_282
 4	283	val_283
 4	284	val_284
 4	285	val_285
 4	286	val_286
 4	287	val_287
-10	288	val_288
 4	289	val_289
 4	291	val_291
 4	292	val_292
 4	296	val_296
-18	298	val_298
 4	30	val_30
 4	302	val_302
 4	305	val_305
 4	306	val_306
-10	307	val_307
 4	308	val_308
-10	309	val_309
 4	310	val_310
-18	311	val_311
 4	315	val_315
-18	316	val_316
-10	317	val_317
-18	318	val_318
-10	321	val_321
-10	322	val_322
 4	323	val_323
-10	325	val_325
-18	327	val_327
 4	33	val_33
-10	331	val_331
 4	332	val_332
-10	333	val_333
 4	335	val_335
 4	336	val_336
 4	338	val_338
 4	339	val_339
 4	34	val_34
 4	341	val_341
-10	342	val_342
-10	344	val_344
 4	345	val_345
-40	348	val_348
-18	35	val_35
 4	351	val_351
-10	353	val_353
 4	356	val_356
 4	360	val_360
 4	362	val_362
 4	364	val_364
 4	365	val_365
 4	366	val_366
-10	367	val_367
 4	368	val_368
-18	369	val_369
-10	37	val_37
 4	373	val_373
 4	374	val_374
 4	375	val_375
 4	377	val_377
 4	378	val_378
 4	379	val_379
-10	382	val_382
-18	384	val_384
 4	386	val_386
 4	389	val_389
 4	392	val_392
 4	393	val_393
 4	394	val_394
-10	395	val_395
-18	396	val_396
-10	397	val_397
-10	399	val_399
 4	4	val_4
 4	400	val_400
-40	401	val_401
 4	402	val_402
-18	403	val_403
-10	404	val_404
-28	406	val_406
 4	407	val_407
-18	409	val_409
 4	41	val_41
 4	411	val_411
-10	413	val_413
-10	414	val_414
-18	417	val_417
 4	418	val_418
 4	419	val_419
-10	42	val_42
 4	421	val_421
-10	424	val_424
 4	427	val_427
-10	429	val_429
 4	43	val_43
-18	430	val_430
-18	431	val_431
 4	432	val_432
 4	435	val_435
 4	436	val_436
 4	437	val_437
-18	438	val_438
-10	439	val_439
 4	44	val_44
 4	443	val_443
 4	444	val_444
@@ -1210,71 +1236,49 @@ POSTHOOK: Input: default@srcpart@ds=2008
 4	449	val_449
 4	452	val_452
 4	453	val_453
-18	454	val_454
 4	455	val_455
 4	457	val_457
-10	458	val_458
-10	459	val_459
 4	460	val_460
-10	462	val_462
-10	463	val_463
-18	466	val_466
 4	467	val_467
-28	468	val_468
-40	469	val_469
 4	47	val_47
 4	470	val_470
 4	472	val_472
 4	475	val_475
 4	477	val_477
-10	478	val_478
 4	479	val_479
-18	480	val_480
 4	481	val_481
 4	482	val_482
 4	483	val_483
 4	484	val_484
 4	485	val_485
 4	487	val_487
-28	489	val_489
 4	490	val_490
 4	491	val_491
-10	492	val_492
 4	493	val_493
 4	494	val_494
 4	495	val_495
 4	496	val_496
 4	497	val_497
-18	498	val_498
-18	5	val_5
-10	51	val_51
 4	53	val_53
 4	54	val_54
 4	57	val_57
-10	58	val_58
 4	64	val_64
 4	65	val_65
 4	66	val_66
-10	67	val_67
 4	69	val_69
-18	70	val_70
-10	72	val_72
 4	74	val_74
-10	76	val_76
 4	77	val_77
 4	78	val_78
 4	8	val_8
 4	80	val_80
 4	82	val_82
-10	83	val_83
-10	84	val_84
 4	85	val_85
 4	86	val_86
 4	87	val_87
 4	9	val_9
-18	90	val_90
 4	92	val_92
-10	95	val_95
 4	96	val_96
-10	97	val_97
-10	98	val_98
+40	230	val_230
+40	348	val_348
+40	401	val_401
+40	469	val_469

Modified: hive/trunk/ql/src/test/results/clientpositive/union31.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/union31.q.out?rev=1598678&r1=1598677&r2=1598678&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/union31.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/union31.q.out Fri May 30 17:37:05 2014
@@ -1,6 +1,10 @@
-PREHOOK: query: drop table t1
+PREHOOK: query: -- SORT_QUERY_RESULTS
+
+drop table t1
 PREHOOK: type: DROPTABLE
-POSTHOOK: query: drop table t1
+POSTHOOK: query: -- SORT_QUERY_RESULTS
+
+drop table t1
 POSTHOOK: type: DROPTABLE
 PREHOOK: query: drop table t2
 PREHOOK: type: DROPTABLE
@@ -258,11 +262,11 @@ POSTHOOK: Lineage: t3.cnt EXPRESSION [(t
 POSTHOOK: Lineage: t3.key EXPRESSION [(t2)t2.FieldSchema(name:key, type:string, comment:null), (t1)t1.FieldSchema(name:key, type:string, comment:null), ]
 POSTHOOK: Lineage: t4.cnt EXPRESSION [(t2)t2.null, (t1)t1.null, ]
 POSTHOOK: Lineage: t4.value EXPRESSION [(t2)t2.FieldSchema(name:value, type:string, comment:null), (t1)t1.FieldSchema(name:value, type:string, comment:null), ]
-PREHOOK: query: select * from t3 order by key
+PREHOOK: query: select * from t3
 PREHOOK: type: QUERY
 PREHOOK: Input: default@t3
 #### A masked pattern was here ####
-POSTHOOK: query: select * from t3 order by key
+POSTHOOK: query: select * from t3
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t3
 #### A masked pattern was here ####
@@ -272,11 +276,11 @@ POSTHOOK: Input: default@t3
 5	6
 8	2
 9	2
-PREHOOK: query: select * from t4 order by value
+PREHOOK: query: select * from t4
 PREHOOK: type: QUERY
 PREHOOK: Input: default@t4
 #### A masked pattern was here ####
-POSTHOOK: query: select * from t4 order by value
+POSTHOOK: query: select * from t4
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t4
 #### A masked pattern was here ####
@@ -543,11 +547,11 @@ POSTHOOK: Lineage: t5.c1 EXPRESSION [(t2
 POSTHOOK: Lineage: t5.cnt EXPRESSION [(t2)t2.null, (t1)t1.null, ]
 POSTHOOK: Lineage: t6.c1 EXPRESSION [(t2)t2.FieldSchema(name:key, type:string, comment:null), (t1)t1.FieldSchema(name:key, type:string, comment:null), ]
 POSTHOOK: Lineage: t6.cnt EXPRESSION [(t2)t2.null, (t1)t1.null, ]
-PREHOOK: query: select * from t5 order by c1
+PREHOOK: query: select * from t5
 PREHOOK: type: QUERY
 PREHOOK: Input: default@t5
 #### A masked pattern was here ####
-POSTHOOK: query: select * from t5 order by c1
+POSTHOOK: query: select * from t5
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t5
 #### A masked pattern was here ####
@@ -557,11 +561,11 @@ POSTHOOK: Input: default@t5
 5	6
 8	2
 9	2
-PREHOOK: query: select * from t6 order by c1
+PREHOOK: query: select * from t6
 PREHOOK: type: QUERY
 PREHOOK: Input: default@t6
 #### A masked pattern was here ####
-POSTHOOK: query: select * from t6 order by c1
+POSTHOOK: query: select * from t6
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t6
 #### A masked pattern was here ####
@@ -821,11 +825,11 @@ POSTHOOK: Lineage: t7.c1 EXPRESSION [(t2
 POSTHOOK: Lineage: t7.cnt EXPRESSION [(t2)t2.null, (t1)t1.null, ]
 POSTHOOK: Lineage: t8.c1 EXPRESSION [(t2)t2.FieldSchema(name:key, type:string, comment:null), (t1)t1.FieldSchema(name:key, type:string, comment:null), ]
 POSTHOOK: Lineage: t8.cnt EXPRESSION [(t2)t2.null, (t1)t1.null, ]
-PREHOOK: query: select * from t7 order by c1
+PREHOOK: query: select * from t7
 PREHOOK: type: QUERY
 PREHOOK: Input: default@t7
 #### A masked pattern was here ####
-POSTHOOK: query: select * from t7 order by c1
+POSTHOOK: query: select * from t7
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t7
 #### A masked pattern was here ####
@@ -835,11 +839,11 @@ POSTHOOK: Input: default@t7
 5	2
 8	2
 9	2
-PREHOOK: query: select * from t8 order by c1
+PREHOOK: query: select * from t8
 PREHOOK: type: QUERY
 PREHOOK: Input: default@t8
 #### A masked pattern was here ####
-POSTHOOK: query: select * from t8 order by c1
+POSTHOOK: query: select * from t8
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t8
 #### A masked pattern was here ####

Modified: hive/trunk/ql/src/test/results/clientpositive/union32.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/union32.q.out?rev=1598678&r1=1598677&r2=1598678&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/union32.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/union32.q.out Fri May 30 17:37:05 2014
@@ -1,10 +1,14 @@
-PREHOOK: query: -- This tests various union queries which have columns on one side of the query
+PREHOOK: query: -- SORT_QUERY_RESULTS
+
+-- This tests various union queries which have columns on one side of the query
 -- being of double type and those on the other side another
 
 CREATE TABLE t1 AS SELECT * FROM src WHERE key < 10
 PREHOOK: type: CREATETABLE_AS_SELECT
 PREHOOK: Input: default@src
-POSTHOOK: query: -- This tests various union queries which have columns on one side of the query
+POSTHOOK: query: -- SORT_QUERY_RESULTS
+
+-- This tests various union queries which have columns on one side of the query
 -- being of double type and those on the other side another
 
 CREATE TABLE t1 AS SELECT * FROM src WHERE key < 10
@@ -99,7 +103,6 @@ PREHOOK: query: SELECT * FROM 
 (SELECT CAST(key AS DOUBLE) AS key FROM t1
 UNION ALL
 SELECT CAST(key AS BIGINT) AS key FROM t2) a
-ORDER BY key
 PREHOOK: type: QUERY
 PREHOOK: Input: default@t1
 PREHOOK: Input: default@t2
@@ -108,7 +111,6 @@ POSTHOOK: query: SELECT * FROM 
 (SELECT CAST(key AS DOUBLE) AS key FROM t1
 UNION ALL
 SELECT CAST(key AS BIGINT) AS key FROM t2) a
-ORDER BY key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t1
 POSTHOOK: Input: default@t2
@@ -139,7 +141,6 @@ SELECT * FROM 
 (SELECT CAST(a.key AS BIGINT) AS key FROM t1 a JOIN t2 b ON a.key = b.key
 UNION ALL
 SELECT CAST(key AS DOUBLE) AS key FROM t2) a
-ORDER BY key
 PREHOOK: type: QUERY
 POSTHOOK: query: -- Test union with join on the left
 EXPLAIN
@@ -147,7 +148,6 @@ SELECT * FROM 
 (SELECT CAST(a.key AS BIGINT) AS key FROM t1 a JOIN t2 b ON a.key = b.key
 UNION ALL
 SELECT CAST(key AS DOUBLE) AS key FROM t2) a
-ORDER BY key
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
   Stage-3 is a root stage
@@ -211,11 +211,13 @@ STAGE PLANS:
                   expressions: _col0 (type: double)
                   outputColumnNames: _col0
                   Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
-                  Reduce Output Operator
-                    key expressions: _col0 (type: double)
-                    sort order: +
+                  File Output Operator
+                    compressed: false
                     Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
-                    value expressions: _col0 (type: double)
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
           TableScan
             Union
               Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
@@ -223,21 +225,13 @@ STAGE PLANS:
                 expressions: _col0 (type: double)
                 outputColumnNames: _col0
                 Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
-                Reduce Output Operator
-                  key expressions: _col0 (type: double)
-                  sort order: +
+                File Output Operator
+                  compressed: false
                   Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
-                  value expressions: _col0 (type: double)
-      Reduce Operator Tree:
-        Extract
-          Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
-          File Output Operator
-            compressed: false
-            Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
-            table:
-                input format: org.apache.hadoop.mapred.TextInputFormat
-                output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                  table:
+                      input format: org.apache.hadoop.mapred.TextInputFormat
+                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
   Stage: Stage-0
     Fetch Operator
@@ -249,7 +243,6 @@ PREHOOK: query: SELECT * FROM 
 (SELECT CAST(a.key AS BIGINT) AS key FROM t1 a JOIN t2 b ON a.key = b.key
 UNION ALL
 SELECT CAST(key AS DOUBLE) AS key FROM t2) a
-ORDER BY key
 PREHOOK: type: QUERY
 PREHOOK: Input: default@t1
 PREHOOK: Input: default@t2
@@ -258,7 +251,6 @@ POSTHOOK: query: SELECT * FROM 
 (SELECT CAST(a.key AS BIGINT) AS key FROM t1 a JOIN t2 b ON a.key = b.key
 UNION ALL
 SELECT CAST(key AS DOUBLE) AS key FROM t2) a
-ORDER BY key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t1
 POSTHOOK: Input: default@t2
@@ -301,7 +293,6 @@ SELECT * FROM 
 (SELECT CAST(key AS DOUBLE) AS key FROM t2
 UNION ALL
 SELECT CAST(a.key AS BIGINT) AS key FROM t1 a JOIN t2 b ON a.key = b.key) a
-ORDER BY key
 PREHOOK: type: QUERY
 POSTHOOK: query: -- Test union with join on the right
 EXPLAIN
@@ -309,7 +300,6 @@ SELECT * FROM 
 (SELECT CAST(key AS DOUBLE) AS key FROM t2
 UNION ALL
 SELECT CAST(a.key AS BIGINT) AS key FROM t1 a JOIN t2 b ON a.key = b.key) a
-ORDER BY key
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
@@ -367,11 +357,13 @@ STAGE PLANS:
                 expressions: _col0 (type: double)
                 outputColumnNames: _col0
                 Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
-                Reduce Output Operator
-                  key expressions: _col0 (type: double)
-                  sort order: +
+                File Output Operator
+                  compressed: false
                   Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
-                  value expressions: _col0 (type: double)
+                  table:
+                      input format: org.apache.hadoop.mapred.TextInputFormat
+                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
           TableScan
             alias: t2
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
@@ -385,21 +377,13 @@ STAGE PLANS:
                   expressions: _col0 (type: double)
                   outputColumnNames: _col0
                   Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
-                  Reduce Output Operator
-                    key expressions: _col0 (type: double)
-                    sort order: +
+                  File Output Operator
+                    compressed: false
                     Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
-                    value expressions: _col0 (type: double)
-      Reduce Operator Tree:
-        Extract
-          Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
-          File Output Operator
-            compressed: false
-            Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
-            table:
-                input format: org.apache.hadoop.mapred.TextInputFormat
-                output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
   Stage: Stage-0
     Fetch Operator
@@ -411,7 +395,6 @@ PREHOOK: query: SELECT * FROM 
 (SELECT CAST(key AS DOUBLE) AS key FROM t2
 UNION ALL
 SELECT CAST(a.key AS BIGINT) AS key FROM t1 a JOIN t2 b ON a.key = b.key) a
-ORDER BY key
 PREHOOK: type: QUERY
 PREHOOK: Input: default@t1
 PREHOOK: Input: default@t2
@@ -420,7 +403,6 @@ POSTHOOK: query: SELECT * FROM 
 (SELECT CAST(key AS DOUBLE) AS key FROM t2
 UNION ALL
 SELECT CAST(a.key AS BIGINT) AS key FROM t1 a JOIN t2 b ON a.key = b.key) a
-ORDER BY key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t1
 POSTHOOK: Input: default@t2
@@ -463,7 +445,6 @@ SELECT * FROM 
 (SELECT CAST(a.key AS BIGINT) AS key, CAST(b.key AS DOUBLE) AS value FROM t1 a JOIN t2 b ON a.key = b.key
 UNION ALL
 SELECT CAST(key AS DOUBLE) AS key, CAST(key AS STRING) AS value FROM t2) a
-ORDER BY key
 PREHOOK: type: QUERY
 POSTHOOK: query: -- Test union with join on the left selecting multiple columns
 EXPLAIN
@@ -471,7 +452,6 @@ SELECT * FROM 
 (SELECT CAST(a.key AS BIGINT) AS key, CAST(b.key AS DOUBLE) AS value FROM t1 a JOIN t2 b ON a.key = b.key
 UNION ALL
 SELECT CAST(key AS DOUBLE) AS key, CAST(key AS STRING) AS value FROM t2) a
-ORDER BY key
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
   Stage-3 is a root stage
@@ -536,11 +516,13 @@ STAGE PLANS:
                   expressions: _col0 (type: double), _col1 (type: string)
                   outputColumnNames: _col0, _col1
                   Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
-                  Reduce Output Operator
-                    key expressions: _col0 (type: double)
-                    sort order: +
+                  File Output Operator
+                    compressed: false
                     Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
-                    value expressions: _col0 (type: double), _col1 (type: string)
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
           TableScan
             Union
               Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
@@ -548,21 +530,13 @@ STAGE PLANS:
                 expressions: _col0 (type: double), _col1 (type: string)
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
-                Reduce Output Operator
-                  key expressions: _col0 (type: double)
-                  sort order: +
+                File Output Operator
+                  compressed: false
                   Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
-                  value expressions: _col0 (type: double), _col1 (type: string)
-      Reduce Operator Tree:
-        Extract
-          Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
-          File Output Operator
-            compressed: false
-            Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
-            table:
-                input format: org.apache.hadoop.mapred.TextInputFormat
-                output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                  table:
+                      input format: org.apache.hadoop.mapred.TextInputFormat
+                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
   Stage: Stage-0
     Fetch Operator
@@ -574,7 +548,6 @@ PREHOOK: query: SELECT * FROM 
 (SELECT CAST(a.key AS BIGINT) AS key, CAST(b.key AS DOUBLE) AS value FROM t1 a JOIN t2 b ON a.key = b.key
 UNION ALL
 SELECT CAST(key AS DOUBLE) AS key, CAST(key AS STRING) AS value FROM t2) a
-ORDER BY key
 PREHOOK: type: QUERY
 PREHOOK: Input: default@t1
 PREHOOK: Input: default@t2
@@ -583,7 +556,6 @@ POSTHOOK: query: SELECT * FROM 
 (SELECT CAST(a.key AS BIGINT) AS key, CAST(b.key AS DOUBLE) AS value FROM t1 a JOIN t2 b ON a.key = b.key
 UNION ALL
 SELECT CAST(key AS DOUBLE) AS key, CAST(key AS STRING) AS value FROM t2) a
-ORDER BY key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t1
 POSTHOOK: Input: default@t2
@@ -600,10 +572,13 @@ POSTHOOK: Input: default@t2
 0.0	0.0
 0.0	0.0
 0.0	0.0
-2.0	2.0
 2.0	2
+2.0	2.0
 4.0	4
 4.0	4.0
+5.0	5
+5.0	5
+5.0	5
 5.0	5.0
 5.0	5.0
 5.0	5.0
@@ -613,20 +588,16 @@ POSTHOOK: Input: default@t2
 5.0	5.0
 5.0	5.0
 5.0	5.0
-5.0	5
-5.0	5
-5.0	5
 8.0	8
 8.0	8.0
-9.0	9.0
 9.0	9
+9.0	9.0
 PREHOOK: query: -- Test union with join on the right selecting multiple columns
 EXPLAIN
 SELECT * FROM 
 (SELECT CAST(key AS DOUBLE) AS key, CAST(key AS STRING) AS value FROM t2
 UNION ALL
 SELECT CAST(a.key AS BIGINT) AS key, CAST(b.key AS DOUBLE) AS value FROM t1 a JOIN t2 b ON a.key = b.key) a
-ORDER BY key
 PREHOOK: type: QUERY
 POSTHOOK: query: -- Test union with join on the right selecting multiple columns
 EXPLAIN
@@ -634,7 +605,6 @@ SELECT * FROM 
 (SELECT CAST(key AS DOUBLE) AS key, CAST(key AS STRING) AS value FROM t2
 UNION ALL
 SELECT CAST(a.key AS BIGINT) AS key, CAST(b.key AS DOUBLE) AS value FROM t1 a JOIN t2 b ON a.key = b.key) a
-ORDER BY key
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
@@ -693,11 +663,13 @@ STAGE PLANS:
                 expressions: _col0 (type: double), _col1 (type: double)
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
-                Reduce Output Operator
-                  key expressions: _col0 (type: double)
-                  sort order: +
+                File Output Operator
+                  compressed: false
                   Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
-                  value expressions: _col0 (type: double), _col1 (type: double)
+                  table:
+                      input format: org.apache.hadoop.mapred.TextInputFormat
+                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
           TableScan
             alias: t2
             Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE
@@ -711,21 +683,13 @@ STAGE PLANS:
                   expressions: _col0 (type: double), _col1 (type: double)
                   outputColumnNames: _col0, _col1
                   Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
-                  Reduce Output Operator
-                    key expressions: _col0 (type: double)
-                    sort order: +
+                  File Output Operator
+                    compressed: false
                     Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
-                    value expressions: _col0 (type: double), _col1 (type: double)
-      Reduce Operator Tree:
-        Extract
-          Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
-          File Output Operator
-            compressed: false
-            Statistics: Num rows: 21 Data size: 147 Basic stats: COMPLETE Column stats: NONE
-            table:
-                input format: org.apache.hadoop.mapred.TextInputFormat
-                output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
   Stage: Stage-0
     Fetch Operator
@@ -737,7 +701,6 @@ PREHOOK: query: SELECT * FROM 
 (SELECT CAST(key AS DOUBLE) AS key, CAST(key AS STRING) AS value FROM t2
 UNION ALL
 SELECT CAST(a.key AS BIGINT) AS key, CAST(b.key AS DOUBLE) AS value FROM t1 a JOIN t2 b ON a.key = b.key) a
-ORDER BY key
 PREHOOK: type: QUERY
 PREHOOK: Input: default@t1
 PREHOOK: Input: default@t2
@@ -746,7 +709,6 @@ POSTHOOK: query: SELECT * FROM 
 (SELECT CAST(key AS DOUBLE) AS key, CAST(key AS STRING) AS value FROM t2
 UNION ALL
 SELECT CAST(a.key AS BIGINT) AS key, CAST(b.key AS DOUBLE) AS value FROM t1 a JOIN t2 b ON a.key = b.key) a
-ORDER BY key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@t1
 POSTHOOK: Input: default@t2

Modified: hive/trunk/ql/src/test/results/clientpositive/union_date.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/union_date.q.out?rev=1598678&r1=1598677&r2=1598678&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/union_date.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/union_date.q.out Fri May 30 17:37:05 2014
@@ -1,6 +1,10 @@
-PREHOOK: query: drop table union_date_1
+PREHOOK: query: -- SORT_QUERY_RESULTS
+
+drop table union_date_1
 PREHOOK: type: DROPTABLE
-POSTHOOK: query: drop table union_date_1
+POSTHOOK: query: -- SORT_QUERY_RESULTS
+
+drop table union_date_1
 POSTHOOK: type: DROPTABLE
 PREHOOK: query: drop table union_date_2
 PREHOOK: type: DROPTABLE
@@ -64,7 +68,7 @@ PREHOOK: query: select * from (
   select fl_num, fl_date from union_date_1
   union all
   select fl_num, fl_date from union_date_2
-) union_result order by fl_date, fl_num
+) union_result
 PREHOOK: type: QUERY
 PREHOOK: Input: default@union_date_1
 PREHOOK: Input: default@union_date_2
@@ -73,51 +77,51 @@ POSTHOOK: query: select * from (
   select fl_num, fl_date from union_date_1
   union all
   select fl_num, fl_date from union_date_2
-) union_result order by fl_date, fl_num
+) union_result
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@union_date_1
 POSTHOOK: Input: default@union_date_2
 #### A masked pattern was here ####
 1064	2000-11-20
 1064	2000-11-20
-1142	2000-11-21
-1142	2000-11-21
-1599	2000-11-22
-1599	2000-11-22
-361	2000-11-23
-361	2000-11-23
-897	2000-11-24
-897	2000-11-24
-1531	2000-11-25
-1531	2000-11-25
-1610	2000-11-26
-1610	2000-11-26
-3198	2000-11-27
-3198	2000-11-27
 1064	2000-11-28
 1064	2000-11-28
-1142	2000-11-28
-1142	2000-11-28
 1064	2010-10-20
 1064	2010-10-20
+1064	2010-10-28
+1064	2010-10-28
+1142	2000-11-21
+1142	2000-11-21
+1142	2000-11-28
+1142	2000-11-28
 1142	2010-10-21
 1142	2010-10-21
-1599	2010-10-22
-1599	2010-10-22
-361	2010-10-23
-361	2010-10-23
-897	2010-10-24
-897	2010-10-24
+1142	2010-10-29
+1142	2010-10-29
+1531	2000-11-25
+1531	2000-11-25
 1531	2010-10-25
 1531	2010-10-25
+1599	2000-11-22
+1599	2000-11-22
+1599	2010-10-22
+1599	2010-10-22
+1610	2000-11-26
+1610	2000-11-26
 1610	2010-10-26
 1610	2010-10-26
+3198	2000-11-27
+3198	2000-11-27
 3198	2010-10-27
 3198	2010-10-27
-1064	2010-10-28
-1064	2010-10-28
-1142	2010-10-29
-1142	2010-10-29
+361	2000-11-23
+361	2000-11-23
+361	2010-10-23
+361	2010-10-23
+897	2000-11-24
+897	2000-11-24
+897	2010-10-24
+897	2010-10-24
 PREHOOK: query: drop table union_date_1
 PREHOOK: type: DROPTABLE
 PREHOOK: Input: default@union_date_1

Modified: hive/trunk/ql/src/test/results/clientpositive/union_top_level.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/union_top_level.q.out?rev=1598678&r1=1598677&r2=1598678&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/union_top_level.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/union_top_level.q.out Fri May 30 17:37:05 2014
@@ -1,22 +1,22 @@
-PREHOOK: query: -- top level
+PREHOOK: query: -- SORT_QUERY_RESULTS
+
+-- top level
 explain
-select * from (
 select key, 0 as value from src where key % 3 == 0 limit 3
 union all
 select key, 1 as value from src where key % 3 == 1 limit 3
 union all
 select key, 2 as value from src where key % 3 == 2 limit 3
-) q1 order by key
 PREHOOK: type: QUERY
-POSTHOOK: query: -- top level
+POSTHOOK: query: -- SORT_QUERY_RESULTS
+
+-- top level
 explain
-select * from (
 select key, 0 as value from src where key % 3 == 0 limit 3
 union all
 select key, 1 as value from src where key % 3 == 1 limit 3
 union all
 select key, 2 as value from src where key % 3 == 2 limit 3
-) q1 order by key
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
@@ -33,10 +33,10 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 58 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((key % 3) = 1) (type: boolean)
+              predicate: ((key % 3) = 0) (type: boolean)
               Statistics: Num rows: 29 Data size: 2906 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: key (type: string), 1 (type: int)
+                expressions: key (type: string), 0 (type: int)
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 29 Data size: 2906 Basic stats: COMPLETE Column stats: NONE
                 Limit
@@ -69,11 +69,13 @@ STAGE PLANS:
                 expressions: _col0 (type: string), _col1 (type: int)
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 9 Data size: 900 Basic stats: COMPLETE Column stats: NONE
-                Reduce Output Operator
-                  key expressions: _col0 (type: string)
-                  sort order: +
+                File Output Operator
+                  compressed: false
                   Statistics: Num rows: 9 Data size: 900 Basic stats: COMPLETE Column stats: NONE
-                  value expressions: _col0 (type: string), _col1 (type: int)
+                  table:
+                      input format: org.apache.hadoop.mapred.TextInputFormat
+                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
           TableScan
             Union
               Statistics: Num rows: 9 Data size: 900 Basic stats: COMPLETE Column stats: NONE
@@ -81,11 +83,13 @@ STAGE PLANS:
                 expressions: _col0 (type: string), _col1 (type: int)
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 9 Data size: 900 Basic stats: COMPLETE Column stats: NONE
-                Reduce Output Operator
-                  key expressions: _col0 (type: string)
-                  sort order: +
+                File Output Operator
+                  compressed: false
                   Statistics: Num rows: 9 Data size: 900 Basic stats: COMPLETE Column stats: NONE
-                  value expressions: _col0 (type: string), _col1 (type: int)
+                  table:
+                      input format: org.apache.hadoop.mapred.TextInputFormat
+                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
           TableScan
             Union
               Statistics: Num rows: 9 Data size: 900 Basic stats: COMPLETE Column stats: NONE
@@ -93,21 +97,13 @@ STAGE PLANS:
                 expressions: _col0 (type: string), _col1 (type: int)
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 9 Data size: 900 Basic stats: COMPLETE Column stats: NONE
-                Reduce Output Operator
-                  key expressions: _col0 (type: string)
-                  sort order: +
+                File Output Operator
+                  compressed: false
                   Statistics: Num rows: 9 Data size: 900 Basic stats: COMPLETE Column stats: NONE
-                  value expressions: _col0 (type: string), _col1 (type: int)
-      Reduce Operator Tree:
-        Extract
-          Statistics: Num rows: 9 Data size: 900 Basic stats: COMPLETE Column stats: NONE
-          File Output Operator
-            compressed: false
-            Statistics: Num rows: 9 Data size: 900 Basic stats: COMPLETE Column stats: NONE
-            table:
-                input format: org.apache.hadoop.mapred.TextInputFormat
-                output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                  table:
+                      input format: org.apache.hadoop.mapred.TextInputFormat
+                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
   Stage: Stage-3
     Map Reduce
@@ -116,10 +112,10 @@ STAGE PLANS:
             alias: src
             Statistics: Num rows: 58 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: ((key % 3) = 0) (type: boolean)
+              predicate: ((key % 3) = 1) (type: boolean)
               Statistics: Num rows: 29 Data size: 2906 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: key (type: string), 0 (type: int)
+                expressions: key (type: string), 1 (type: int)
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 29 Data size: 2906 Basic stats: COMPLETE Column stats: NONE
                 Limit
@@ -181,23 +177,19 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: select * from (
-select key, 0 as value from src where key % 3 == 0 limit 3
+PREHOOK: query: select key, 0 as value from src where key % 3 == 0 limit 3
 union all
 select key, 1 as value from src where key % 3 == 1 limit 3
 union all
 select key, 2 as value from src where key % 3 == 2 limit 3
-) q1 order by key
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: select * from (
-select key, 0 as value from src where key % 3 == 0 limit 3
+POSTHOOK: query: select key, 0 as value from src where key % 3 == 0 limit 3
 union all
 select key, 1 as value from src where key % 3 == 1 limit 3
 union all
 select key, 2 as value from src where key % 3 == 2 limit 3
-) q1 order by key
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -211,18 +203,14 @@ POSTHOOK: Input: default@src
 484	1
 86	2
 PREHOOK: query: explain
-select * from (
 select s1.key as k, s2.value as v from src s1 join src s2 on (s1.key = s2.key) limit 10
 union all
 select s1.key as k, s2.value as v from src s1 join src s2 on (s1.key = s2.key) limit 10
-) q1 order by k
 PREHOOK: type: QUERY
 POSTHOOK: query: explain
-select * from (
 select s1.key as k, s2.value as v from src s1 join src s2 on (s1.key = s2.key) limit 10
 union all
 select s1.key as k, s2.value as v from src s1 join src s2 on (s1.key = s2.key) limit 10
-) q1 order by k
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
@@ -308,11 +296,13 @@ STAGE PLANS:
                 expressions: _col0 (type: string), _col1 (type: string)
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 20 Data size: 2020 Basic stats: COMPLETE Column stats: NONE
-                Reduce Output Operator
-                  key expressions: _col0 (type: string)
-                  sort order: +
+                File Output Operator
+                  compressed: false
                   Statistics: Num rows: 20 Data size: 2020 Basic stats: COMPLETE Column stats: NONE
-                  value expressions: _col0 (type: string), _col1 (type: string)
+                  table:
+                      input format: org.apache.hadoop.mapred.TextInputFormat
+                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
           TableScan
             Union
               Statistics: Num rows: 20 Data size: 2020 Basic stats: COMPLETE Column stats: NONE
@@ -320,43 +310,35 @@ STAGE PLANS:
                 expressions: _col0 (type: string), _col1 (type: string)
                 outputColumnNames: _col0, _col1
                 Statistics: Num rows: 20 Data size: 2020 Basic stats: COMPLETE Column stats: NONE
-                Reduce Output Operator
-                  key expressions: _col0 (type: string)
-                  sort order: +
+                File Output Operator
+                  compressed: false
                   Statistics: Num rows: 20 Data size: 2020 Basic stats: COMPLETE Column stats: NONE
-                  value expressions: _col0 (type: string), _col1 (type: string)
-      Reduce Operator Tree:
-        Extract
-          Statistics: Num rows: 20 Data size: 2020 Basic stats: COMPLETE Column stats: NONE
-          File Output Operator
-            compressed: false
-            Statistics: Num rows: 20 Data size: 2020 Basic stats: COMPLETE Column stats: NONE
-            table:
-                input format: org.apache.hadoop.mapred.TextInputFormat
-                output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                  table:
+                      input format: org.apache.hadoop.mapred.TextInputFormat
+                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
   Stage: Stage-5
     Map Reduce
       Map Operator Tree:
           TableScan
-            alias: s2
-            Statistics: Num rows: 29 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
+            alias: s1
+            Statistics: Num rows: 58 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
             Reduce Output Operator
               key expressions: key (type: string)
               sort order: +
               Map-reduce partition columns: key (type: string)
-              Statistics: Num rows: 29 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
-              value expressions: value (type: string)
+              Statistics: Num rows: 58 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
+              value expressions: key (type: string)
           TableScan
-            alias: s1
-            Statistics: Num rows: 58 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
+            alias: s2
+            Statistics: Num rows: 29 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
             Reduce Output Operator
               key expressions: key (type: string)
               sort order: +
               Map-reduce partition columns: key (type: string)
-              Statistics: Num rows: 58 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
-              value expressions: key (type: string)
+              Statistics: Num rows: 29 Data size: 5812 Basic stats: COMPLETE Column stats: NONE
+              value expressions: value (type: string)
       Reduce Operator Tree:
         Join Operator
           condition map:
@@ -407,19 +389,15 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: select * from (
-select s1.key as k, s2.value as v from src s1 join src s2 on (s1.key = s2.key) limit 10
+PREHOOK: query: select s1.key as k, s2.value as v from src s1 join src s2 on (s1.key = s2.key) limit 10
 union all
 select s1.key as k, s2.value as v from src s1 join src s2 on (s1.key = s2.key) limit 10
-) q1 order by k
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: select * from (
-select s1.key as k, s2.value as v from src s1 join src s2 on (s1.key = s2.key) limit 10
+POSTHOOK: query: select s1.key as k, s2.value as v from src s1 join src s2 on (s1.key = s2.key) limit 10
 union all
 select s1.key as k, s2.value as v from src s1 join src s2 on (s1.key = s2.key) limit 10
-) q1 order by k
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
@@ -697,11 +675,11 @@ select key, 2 as value from src where ke
 POSTHOOK: type: CREATETABLE_AS_SELECT
 POSTHOOK: Input: default@src
 POSTHOOK: Output: default@union_top
-PREHOOK: query: select * from union_top order by key
+PREHOOK: query: select * from union_top
 PREHOOK: type: QUERY
 PREHOOK: Input: default@union_top
 #### A masked pattern was here ####
-POSTHOOK: query: select * from union_top order by key
+POSTHOOK: query: select * from union_top
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@union_top
 #### A masked pattern was here ####
@@ -972,11 +950,11 @@ POSTHOOK: Input: default@src
 POSTHOOK: Output: default@union_top
 POSTHOOK: Lineage: union_top.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), (src)src.FieldSchema(name:key, type:string, comment:default), (src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: union_top.value EXPRESSION []
-PREHOOK: query: select * from union_top order by key
+PREHOOK: query: select * from union_top
 PREHOOK: type: QUERY
 PREHOOK: Input: default@union_top
 #### A masked pattern was here ####
-POSTHOOK: query: select * from union_top order by key
+POSTHOOK: query: select * from union_top
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@union_top
 #### A masked pattern was here ####
@@ -1239,11 +1217,11 @@ POSTHOOK: Input: default@src
 POSTHOOK: Output: default@union_top
 POSTHOOK: Lineage: union_top.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), (src)src.FieldSchema(name:key, type:string, comment:default), (src)src.FieldSchema(name:key, type:string, comment:default), ]
 POSTHOOK: Lineage: union_top.value EXPRESSION []
-PREHOOK: query: select * from union_top order by key
+PREHOOK: query: select * from union_top
 PREHOOK: type: QUERY
 PREHOOK: Input: default@union_top
 #### A masked pattern was here ####
-POSTHOOK: query: select * from union_top order by key
+POSTHOOK: query: select * from union_top
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@union_top
 #### A masked pattern was here ####
@@ -1312,12 +1290,12 @@ select key, 2 as value from src where ke
 POSTHOOK: type: CREATEVIEW
 POSTHOOK: Input: default@src
 POSTHOOK: Output: default@union_top_view
-PREHOOK: query: select * from union_top_view order by key
+PREHOOK: query: select * from union_top_view
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Input: default@union_top_view
 #### A masked pattern was here ####
-POSTHOOK: query: select * from union_top_view order by key
+POSTHOOK: query: select * from union_top_view
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 POSTHOOK: Input: default@union_top_view



Mime
View raw message