You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by pr...@apache.org on 2015/09/18 00:02:35 UTC

[1/2] hive git commit: HIVE-11869: LLAP: constprog_dpp.q, explainuser_1.q showing explain diff (Prasanth Jaychandran)

Repository: hive
Updated Branches:
  refs/heads/llap 1067c1b06 -> 0697fd92a


http://git-wip-us.apache.org/repos/asf/hive/blob/0697fd92/ql/src/test/results/clientpositive/llap/explainuser_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/explainuser_1.q.out b/ql/src/test/results/clientpositive/llap/explainuser_1.q.out
new file mode 100644
index 0000000..36f1099
--- /dev/null
+++ b/ql/src/test/results/clientpositive/llap/explainuser_1.q.out
@@ -0,0 +1,8940 @@
+PREHOOK: query: explain create table src_orc_merge_test_part(key int, value string) partitioned by (ds string, ts string) stored as orc
+PREHOOK: type: CREATETABLE
+POSTHOOK: query: explain create table src_orc_merge_test_part(key int, value string) partitioned by (ds string, ts string) stored as orc
+POSTHOOK: type: CREATETABLE
+Stage-0
+   Create Table Operator:
+      columns:["key int","value string"]
+      input format:org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+      name:default.src_orc_merge_test_part
+      output format:org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
+      partition columns:["ds string","ts string"]
+
+PREHOOK: query: create table src_orc_merge_test_part(key int, value string) partitioned by (ds string, ts string) stored as orc
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@src_orc_merge_test_part
+POSTHOOK: query: create table src_orc_merge_test_part(key int, value string) partitioned by (ds string, ts string) stored as orc
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@src_orc_merge_test_part
+PREHOOK: query: alter table src_orc_merge_test_part add partition (ds='2012-01-03', ts='2012-01-03+14:46:31')
+PREHOOK: type: ALTERTABLE_ADDPARTS
+PREHOOK: Output: default@src_orc_merge_test_part
+POSTHOOK: query: alter table src_orc_merge_test_part add partition (ds='2012-01-03', ts='2012-01-03+14:46:31')
+POSTHOOK: type: ALTERTABLE_ADDPARTS
+POSTHOOK: Output: default@src_orc_merge_test_part
+POSTHOOK: Output: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
+PREHOOK: query: desc extended src_orc_merge_test_part partition (ds='2012-01-03', ts='2012-01-03+14:46:31')
+PREHOOK: type: DESCTABLE
+PREHOOK: Input: default@src_orc_merge_test_part
+POSTHOOK: query: desc extended src_orc_merge_test_part partition (ds='2012-01-03', ts='2012-01-03+14:46:31')
+POSTHOOK: type: DESCTABLE
+POSTHOOK: Input: default@src_orc_merge_test_part
+key                 	int                 	                    
+value               	string              	                    
+ds                  	string              	                    
+ts                  	string              	                    
+	 	 
+# Partition Information	 	 
+# col_name            	data_type           	comment             
+	 	 
+ds                  	string              	                    
+ts                  	string              	                    
+	 	 
+#### A masked pattern was here ####
+PREHOOK: query: explain insert overwrite table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src
+PREHOOK: type: QUERY
+POSTHOOK: query: explain insert overwrite table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Stage-3
+   Stats-Aggr Operator
+      Stage-0
+         Move Operator
+            partition:{"ds":"2012-01-03","ts":"2012-01-03+14:46:31"}
+            table:{"input format:":"org.apache.hadoop.hive.ql.io.orc.OrcInputFormat","output format:":"org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat","serde:":"org.apache.hadoop.hive.ql.io.orc.OrcSerde","name:":"default.src_orc_merge_test_part"}
+            Stage-2
+               Dependency Collection{}
+                  Stage-1
+                     Map 1
+                     File Output Operator [FS_3]
+                        compressed:false
+                        Statistics:Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+                        table:{"input format:":"org.apache.hadoop.hive.ql.io.orc.OrcInputFormat","output format:":"org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat","serde:":"org.apache.hadoop.hive.ql.io.orc.OrcSerde","name:":"default.src_orc_merge_test_part"}
+                        Select Operator [SEL_1]
+                           outputColumnNames:["_col0","_col1"]
+                           Statistics:Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+                           TableScan [TS_0]
+                              alias:src
+                              Statistics:Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+
+PREHOOK: query: insert overwrite table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
+POSTHOOK: query: insert overwrite table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
+POSTHOOK: Lineage: src_orc_merge_test_part PARTITION(ds=2012-01-03,ts=2012-01-03+14:46:31).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: src_orc_merge_test_part PARTITION(ds=2012-01-03,ts=2012-01-03+14:46:31).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+PREHOOK: query: explain insert into table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain insert into table src_orc_merge_test_part partition(ds='2012-01-03', ts='2012-01-03+14:46:31') select * from src limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE)
+
+Stage-3
+   Stats-Aggr Operator
+      Stage-0
+         Move Operator
+            partition:{"ds":"2012-01-03","ts":"2012-01-03+14:46:31"}
+            table:{"input format:":"org.apache.hadoop.hive.ql.io.orc.OrcInputFormat","output format:":"org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat","serde:":"org.apache.hadoop.hive.ql.io.orc.OrcSerde","name:":"default.src_orc_merge_test_part"}
+            Stage-2
+               Dependency Collection{}
+                  Stage-1
+                     Reducer 2
+                     File Output Operator [FS_7]
+                        compressed:false
+                        Statistics:Num rows: 100 Data size: 1000 Basic stats: COMPLETE Column stats: NONE
+                        table:{"input format:":"org.apache.hadoop.hive.ql.io.orc.OrcInputFormat","output format:":"org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat","serde:":"org.apache.hadoop.hive.ql.io.orc.OrcSerde","name:":"default.src_orc_merge_test_part"}
+                        Select Operator [SEL_6]
+                           outputColumnNames:["_col0","_col1"]
+                           Statistics:Num rows: 100 Data size: 1000 Basic stats: COMPLETE Column stats: NONE
+                           Limit [LIM_5]
+                              Number of rows:100
+                              Statistics:Num rows: 100 Data size: 1000 Basic stats: COMPLETE Column stats: NONE
+                              Select Operator [SEL_4]
+                              |  outputColumnNames:["_col0","_col1"]
+                              |  Statistics:Num rows: 100 Data size: 1000 Basic stats: COMPLETE Column stats: NONE
+                              |<-Map 1 [SIMPLE_EDGE]
+                                 Reduce Output Operator [RS_3]
+                                    sort order:
+                                    Statistics:Num rows: 100 Data size: 1000 Basic stats: COMPLETE Column stats: NONE
+                                    value expressions:_col0 (type: string), _col1 (type: string)
+                                    Limit [LIM_2]
+                                       Number of rows:100
+                                       Statistics:Num rows: 100 Data size: 1000 Basic stats: COMPLETE Column stats: NONE
+                                       Select Operator [SEL_1]
+                                          outputColumnNames:["_col0","_col1"]
+                                          Statistics:Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+                                          TableScan [TS_0]
+                                             alias:src
+                                             Statistics:Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+
+PREHOOK: query: explain select count(1) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31'
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(1) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31'
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE)
+
+Stage-0
+   Fetch Operator
+      limit:-1
+      Stage-1
+         Reducer 2
+         File Output Operator [FS_8]
+            compressed:false
+            Statistics:Num rows: 1 Data size: 8 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"}
+            Group By Operator [GBY_6]
+            |  aggregations:["count(VALUE._col0)"]
+            |  outputColumnNames:["_col0"]
+            |  Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+            |<-Map 1 [SIMPLE_EDGE]
+               Reduce Output Operator [RS_5]
+                  sort order:
+                  Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                  value expressions:_col0 (type: bigint)
+                  Group By Operator [GBY_4]
+                     aggregations:["count(1)"]
+                     outputColumnNames:["_col0"]
+                     Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                     Select Operator [SEL_2]
+                        Statistics:Num rows: 500 Data size: 47000 Basic stats: COMPLETE Column stats: NONE
+                        TableScan [TS_0]
+                           alias:src_orc_merge_test_part
+                           Statistics:Num rows: 500 Data size: 47000 Basic stats: COMPLETE Column stats: NONE
+
+PREHOOK: query: explain select sum(hash(key)), sum(hash(value)) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31'
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select sum(hash(key)), sum(hash(value)) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31'
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE)
+
+Stage-0
+   Fetch Operator
+      limit:-1
+      Stage-1
+         Reducer 2
+         File Output Operator [FS_8]
+            compressed:false
+            Statistics:Num rows: 1 Data size: 16 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"}
+            Group By Operator [GBY_6]
+            |  aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
+            |  outputColumnNames:["_col0","_col1"]
+            |  Statistics:Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE
+            |<-Map 1 [SIMPLE_EDGE]
+               Reduce Output Operator [RS_5]
+                  sort order:
+                  Statistics:Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE
+                  value expressions:_col0 (type: bigint), _col1 (type: bigint)
+                  Group By Operator [GBY_4]
+                     aggregations:["sum(_col0)","sum(_col1)"]
+                     outputColumnNames:["_col0","_col1"]
+                     Statistics:Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE
+                     Select Operator [SEL_2]
+                        outputColumnNames:["_col0","_col1"]
+                        Statistics:Num rows: 500 Data size: 47000 Basic stats: COMPLETE Column stats: NONE
+                        TableScan [TS_0]
+                           alias:src_orc_merge_test_part
+                           Statistics:Num rows: 500 Data size: 47000 Basic stats: COMPLETE Column stats: NONE
+
+PREHOOK: query: alter table src_orc_merge_test_part partition (ds='2012-01-03', ts='2012-01-03+14:46:31') concatenate
+PREHOOK: type: ALTER_PARTITION_MERGE
+PREHOOK: Input: default@src_orc_merge_test_part
+PREHOOK: Output: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
+POSTHOOK: query: alter table src_orc_merge_test_part partition (ds='2012-01-03', ts='2012-01-03+14:46:31') concatenate
+POSTHOOK: type: ALTER_PARTITION_MERGE
+POSTHOOK: Input: default@src_orc_merge_test_part
+POSTHOOK: Output: default@src_orc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
+PREHOOK: query: explain select count(1) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31'
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(1) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31'
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE)
+
+Stage-0
+   Fetch Operator
+      limit:-1
+      Stage-1
+         Reducer 2
+         File Output Operator [FS_8]
+            compressed:false
+            Statistics:Num rows: 1 Data size: 8 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"}
+            Group By Operator [GBY_6]
+            |  aggregations:["count(VALUE._col0)"]
+            |  outputColumnNames:["_col0"]
+            |  Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+            |<-Map 1 [SIMPLE_EDGE]
+               Reduce Output Operator [RS_5]
+                  sort order:
+                  Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                  value expressions:_col0 (type: bigint)
+                  Group By Operator [GBY_4]
+                     aggregations:["count(1)"]
+                     outputColumnNames:["_col0"]
+                     Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                     Select Operator [SEL_2]
+                        Statistics:Num rows: 1 Data size: 2515 Basic stats: PARTIAL Column stats: NONE
+                        TableScan [TS_0]
+                           alias:src_orc_merge_test_part
+                           Statistics:Num rows: 1 Data size: 2515 Basic stats: PARTIAL Column stats: NONE
+
+PREHOOK: query: explain select sum(hash(key)), sum(hash(value)) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31'
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select sum(hash(key)), sum(hash(value)) from src_orc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31'
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE)
+
+Stage-0
+   Fetch Operator
+      limit:-1
+      Stage-1
+         Reducer 2
+         File Output Operator [FS_8]
+            compressed:false
+            Statistics:Num rows: 1 Data size: 16 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"}
+            Group By Operator [GBY_6]
+            |  aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
+            |  outputColumnNames:["_col0","_col1"]
+            |  Statistics:Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE
+            |<-Map 1 [SIMPLE_EDGE]
+               Reduce Output Operator [RS_5]
+                  sort order:
+                  Statistics:Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE
+                  value expressions:_col0 (type: bigint), _col1 (type: bigint)
+                  Group By Operator [GBY_4]
+                     aggregations:["sum(_col0)","sum(_col1)"]
+                     outputColumnNames:["_col0","_col1"]
+                     Statistics:Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE
+                     Select Operator [SEL_2]
+                        outputColumnNames:["_col0","_col1"]
+                        Statistics:Num rows: 24 Data size: 2515 Basic stats: COMPLETE Column stats: NONE
+                        TableScan [TS_0]
+                           alias:src_orc_merge_test_part
+                           Statistics:Num rows: 24 Data size: 2515 Basic stats: COMPLETE Column stats: NONE
+
+PREHOOK: query: drop table src_orc_merge_test_part
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@src_orc_merge_test_part
+PREHOOK: Output: default@src_orc_merge_test_part
+POSTHOOK: query: drop table src_orc_merge_test_part
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@src_orc_merge_test_part
+POSTHOOK: Output: default@src_orc_merge_test_part
+Warning: Map Join MAPJOIN[20][bigTable=?] in task 'Map 1' is a cross product
+PREHOOK: query: explain select sum(hash(a.k1,a.v1,a.k2, a.v2))
+from (
+select src1.key as k1, src1.value as v1, 
+       src2.key as k2, src2.value as v2 FROM 
+  (select * FROM src WHERE src.key < 10) src1 
+    JOIN 
+  (select * FROM src WHERE src.key < 10) src2
+  SORT BY k1, v1, k2, v2
+) a
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select sum(hash(a.k1,a.v1,a.k2, a.v2))
+from (
+select src1.key as k1, src1.value as v1, 
+       src2.key as k2, src2.value as v2 FROM 
+  (select * FROM src WHERE src.key < 10) src1 
+    JOIN 
+  (select * FROM src WHERE src.key < 10) src2
+  SORT BY k1, v1, k2, v2
+) a
+POSTHOOK: type: QUERY
+Plan not optimized by CBO.
+
+Vertex dependency in root stage
+Map 1 <- Map 4 (BROADCAST_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
+
+Stage-0
+   Fetch Operator
+      limit:-1
+      Stage-1
+         Reducer 3
+         File Output Operator [FS_17]
+            compressed:false
+            Statistics:Num rows: 1 Data size: 8 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"}
+            Group By Operator [GBY_15]
+            |  aggregations:["sum(VALUE._col0)"]
+            |  outputColumnNames:["_col0"]
+            |  Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+            |<-Reducer 2 [SIMPLE_EDGE]
+               Reduce Output Operator [RS_14]
+                  sort order:
+                  Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                  value expressions:_col0 (type: bigint)
+                  Group By Operator [GBY_13]
+                     aggregations:["sum(hash(_col0,_col1,_col2,_col3))"]
+                     outputColumnNames:["_col0"]
+                     Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                     Select Operator [SEL_11]
+                     |  outputColumnNames:["_col0","_col1","_col2","_col3"]
+                     |  Statistics:Num rows: 182 Data size: 1939 Basic stats: COMPLETE Column stats: NONE
+                     |<-Map 1 [SIMPLE_EDGE]
+                        Reduce Output Operator [RS_10]
+                           key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string)
+                           sort order:++++
+                           Statistics:Num rows: 182 Data size: 1939 Basic stats: COMPLETE Column stats: NONE
+                           Map Join Operator [MAPJOIN_20]
+                           |  condition map:[{"":"Inner Join 0 to 1"}]
+                           |  keys:{}
+                           |  outputColumnNames:["_col0","_col1","_col2","_col3"]
+                           |  Statistics:Num rows: 182 Data size: 1939 Basic stats: COMPLETE Column stats: NONE
+                           |<-Map 4 [BROADCAST_EDGE]
+                           |  Reduce Output Operator [RS_7]
+                           |     sort order:
+                           |     Statistics:Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE
+                           |     value expressions:_col0 (type: string), _col1 (type: string)
+                           |     Select Operator [SEL_5]
+                           |        outputColumnNames:["_col0","_col1"]
+                           |        Statistics:Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE
+                           |        Filter Operator [FIL_19]
+                           |           predicate:(key < 10) (type: boolean)
+                           |           Statistics:Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE
+                           |           TableScan [TS_3]
+                           |              alias:src
+                           |              Statistics:Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+                           |<-Select Operator [SEL_2]
+                                 outputColumnNames:["_col0","_col1"]
+                                 Statistics:Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE
+                                 Filter Operator [FIL_18]
+                                    predicate:(key < 10) (type: boolean)
+                                    Statistics:Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE
+                                    TableScan [TS_0]
+                                       alias:src
+                                       Statistics:Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE
+
+PREHOOK: query: explain select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE)
+
+Stage-0
+   Fetch Operator
+      limit:-1
+      Stage-1
+         Reducer 2
+         File Output Operator [FS_7]
+            compressed:false
+            Statistics:Num rows: 10 Data size: 885 Basic stats: COMPLETE Column stats: COMPLETE
+            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"}
+            Select Operator [SEL_6]
+               outputColumnNames:["_col0","_col1","_col2"]
+               Statistics:Num rows: 10 Data size: 885 Basic stats: COMPLETE Column stats: COMPLETE
+               Group By Operator [GBY_5]
+               |  aggregations:["sum(VALUE._col0)"]
+               |  keys:KEY._col0 (type: float), KEY._col1 (type: int), KEY._col2 (type: string)
+               |  outputColumnNames:["_col0","_col1","_col2","_col3"]
+               |  Statistics:Num rows: 10 Data size: 917 Basic stats: COMPLETE Column stats: COMPLETE
+               |<-Map 1 [SIMPLE_EDGE]
+                  Reduce Output Operator [RS_4]
+                     key expressions:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                     Map-reduce partition columns:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                     sort order:+++
+                     Statistics:Num rows: 10 Data size: 917 Basic stats: COMPLETE Column stats: COMPLETE
+                     value expressions:_col3 (type: bigint)
+                     Group By Operator [GBY_3]
+                        aggregations:["sum(_col1)"]
+                        keys:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                        outputColumnNames:["_col0","_col1","_col2","_col3"]
+                        Statistics:Num rows: 10 Data size: 917 Basic stats: COMPLETE Column stats: COMPLETE
+                        Select Operator [SEL_1]
+                           outputColumnNames:["_col0","_col1","_col2"]
+                           Statistics:Num rows: 20 Data size: 262 Basic stats: COMPLETE Column stats: COMPLETE
+                           TableScan [TS_0]
+                              alias:cbo_t1
+                              Statistics:Num rows: 20 Data size: 262 Basic stats: COMPLETE Column stats: COMPLETE
+
+PREHOOK: query: explain select x, y, count(*) from (select key, (c_int+c_float+1+2) as x, sum(c_int) as y from cbo_t1 group by c_float, cbo_t1.c_int, key) R group by y, x
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select x, y, count(*) from (select key, (c_int+c_float+1+2) as x, sum(c_int) as y from cbo_t1 group by c_float, cbo_t1.c_int, key) R group by y, x
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
+
+Stage-0
+   Fetch Operator
+      limit:-1
+      Stage-1
+         Reducer 3
+         File Output Operator [FS_12]
+            compressed:false
+            Statistics:Num rows: 5 Data size: 100 Basic stats: COMPLETE Column stats: COMPLETE
+            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"}
+            Select Operator [SEL_11]
+               outputColumnNames:["_col0","_col1","_col2"]
+               Statistics:Num rows: 5 Data size: 100 Basic stats: COMPLETE Column stats: COMPLETE
+               Group By Operator [GBY_10]
+               |  aggregations:["count(VALUE._col0)"]
+               |  keys:KEY._col0 (type: bigint), KEY._col1 (type: float)
+               |  outputColumnNames:["_col0","_col1","_col2"]
+               |  Statistics:Num rows: 5 Data size: 100 Basic stats: COMPLETE Column stats: COMPLETE
+               |<-Reducer 2 [SIMPLE_EDGE]
+                  Reduce Output Operator [RS_9]
+                     key expressions:_col0 (type: bigint), _col1 (type: float)
+                     Map-reduce partition columns:_col0 (type: bigint), _col1 (type: float)
+                     sort order:++
+                     Statistics:Num rows: 5 Data size: 100 Basic stats: COMPLETE Column stats: COMPLETE
+                     value expressions:_col2 (type: bigint)
+                     Group By Operator [GBY_8]
+                        aggregations:["count()"]
+                        keys:_col0 (type: bigint), _col1 (type: float)
+                        outputColumnNames:["_col0","_col1","_col2"]
+                        Statistics:Num rows: 5 Data size: 100 Basic stats: COMPLETE Column stats: COMPLETE
+                        Select Operator [SEL_6]
+                           outputColumnNames:["_col0","_col1"]
+                           Statistics:Num rows: 10 Data size: 917 Basic stats: COMPLETE Column stats: COMPLETE
+                           Group By Operator [GBY_5]
+                           |  aggregations:["sum(VALUE._col0)"]
+                           |  keys:KEY._col0 (type: float), KEY._col1 (type: int), KEY._col2 (type: string)
+                           |  outputColumnNames:["_col0","_col1","_col2","_col3"]
+                           |  Statistics:Num rows: 10 Data size: 917 Basic stats: COMPLETE Column stats: COMPLETE
+                           |<-Map 1 [SIMPLE_EDGE]
+                              Reduce Output Operator [RS_4]
+                                 key expressions:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                                 Map-reduce partition columns:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                                 sort order:+++
+                                 Statistics:Num rows: 10 Data size: 917 Basic stats: COMPLETE Column stats: COMPLETE
+                                 value expressions:_col3 (type: bigint)
+                                 Group By Operator [GBY_3]
+                                    aggregations:["sum(_col1)"]
+                                    keys:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                                    outputColumnNames:["_col0","_col1","_col2","_col3"]
+                                    Statistics:Num rows: 10 Data size: 917 Basic stats: COMPLETE Column stats: COMPLETE
+                                    Select Operator [SEL_1]
+                                       outputColumnNames:["_col0","_col1","_col2"]
+                                       Statistics:Num rows: 20 Data size: 262 Basic stats: COMPLETE Column stats: COMPLETE
+                                       TableScan [TS_0]
+                                          alias:cbo_t1
+                                          Statistics:Num rows: 20 Data size: 262 Basic stats: COMPLETE Column stats: COMPLETE
+
+PREHOOK: query: explain select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key order by a) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)  group by c_float, cbo_t2.c_int, key order by q/10 desc, r asc) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c order by cbo_t3.c_int+c desc, c
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0) group by c_float, cbo_t1.c_int, key order by a) cbo_t1 join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)  group by c_float, cbo_t2.c_int, key order by q/10 desc, r asc) cbo_t2 on cbo_t1.a=p join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c order by cbo_t3.c_int+c desc, c
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 10 <- Reducer 9 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 11 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+Reducer 9 <- Map 8 (SIMPLE_EDGE)
+
+Stage-0
+   Fetch Operator
+      limit:-1
+      Stage-1
+         Reducer 7
+         File Output Operator [FS_45]
+            compressed:false
+            Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+            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"}
+            Select Operator [SEL_44]
+            |  outputColumnNames:["_col0","_col1","_col2"]
+            |  Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+            |<-Reducer 6 [SIMPLE_EDGE]
+               Reduce Output Operator [RS_43]
+                  key expressions:(UDFToLong(_col0) + _col1) (type: bigint), _col1 (type: bigint)
+                  sort order:-+
+                  Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+                  value expressions:_col0 (type: int), _col2 (type: bigint)
+                  Group By Operator [GBY_41]
+                  |  aggregations:["count(VALUE._col0)"]
+                  |  keys:KEY._col0 (type: int), KEY._col1 (type: bigint)
+                  |  outputColumnNames:["_col0","_col1","_col2"]
+                  |  Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+                  |<-Reducer 5 [SIMPLE_EDGE]
+                     Reduce Output Operator [RS_40]
+                        key expressions:_col0 (type: int), _col1 (type: bigint)
+                        Map-reduce partition columns:_col0 (type: int), _col1 (type: bigint)
+                        sort order:++
+                        Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+                        value expressions:_col2 (type: bigint)
+                        Group By Operator [GBY_39]
+                           aggregations:["count()"]
+                           keys:_col0 (type: int), _col1 (type: bigint)
+                           outputColumnNames:["_col0","_col1","_col2"]
+                           Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+                           Select Operator [SEL_37]
+                              outputColumnNames:["_col0","_col1"]
+                              Statistics:Num rows: 2 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
+                              Filter Operator [FIL_36]
+                                 predicate:((_col1 > 0) or (_col6 >= 0)) (type: boolean)
+                                 Statistics:Num rows: 2 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE
+                                 Merge Join Operator [MERGEJOIN_55]
+                                 |  condition map:[{"":"Inner Join 0 to 1"}]
+                                 |  keys:{"0":"_col0 (type: string)","1":"_col0 (type: string)"}
+                                 |  outputColumnNames:["_col1","_col2","_col6"]
+                                 |  Statistics:Num rows: 3 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |<-Map 11 [SIMPLE_EDGE]
+                                 |  Reduce Output Operator [RS_34]
+                                 |     key expressions:_col0 (type: string)
+                                 |     Map-reduce partition columns:_col0 (type: string)
+                                 |     sort order:+
+                                 |     Statistics:Num rows: 18 Data size: 1424 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |     value expressions:_col1 (type: int)
+                                 |     Select Operator [SEL_30]
+                                 |        outputColumnNames:["_col0","_col1"]
+                                 |        Statistics:Num rows: 18 Data size: 1424 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |        Filter Operator [FIL_53]
+                                 |           predicate:key is not null (type: boolean)
+                                 |           Statistics:Num rows: 18 Data size: 1424 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |           TableScan [TS_29]
+                                 |              alias:cbo_t3
+                                 |              Statistics:Num rows: 20 Data size: 262 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |<-Reducer 4 [SIMPLE_EDGE]
+                                    Reduce Output Operator [RS_32]
+                                       key expressions:_col0 (type: string)
+                                       Map-reduce partition columns:_col0 (type: string)
+                                       sort order:+
+                                       Statistics:Num rows: 1 Data size: 101 Basic stats: COMPLETE Column stats: COMPLETE
+                                       value expressions:_col1 (type: int), _col2 (type: bigint)
+                                       Select Operator [SEL_28]
+                                          outputColumnNames:["_col0","_col1","_col2"]
+                                          Statistics:Num rows: 1 Data size: 101 Basic stats: COMPLETE Column stats: COMPLETE
+                                          Filter Operator [FIL_27]
+                                             predicate:((_col1 + _col4) >= 0) (type: boolean)
+                                             Statistics:Num rows: 1 Data size: 101 Basic stats: COMPLETE Column stats: COMPLETE
+                                             Merge Join Operator [MERGEJOIN_54]
+                                             |  condition map:[{"":"Inner Join 0 to 1"}]
+                                             |  keys:{"0":"_col0 (type: string)","1":"_col0 (type: string)"}
+                                             |  outputColumnNames:["_col0","_col1","_col2","_col4"]
+                                             |  Statistics:Num rows: 1 Data size: 101 Basic stats: COMPLETE Column stats: COMPLETE
+                                             |<-Reducer 10 [SIMPLE_EDGE]
+                                             |  Reduce Output Operator [RS_25]
+                                             |     key expressions:_col0 (type: string)
+                                             |     Map-reduce partition columns:_col0 (type: string)
+                                             |     sort order:+
+                                             |     Statistics:Num rows: 1 Data size: 89 Basic stats: COMPLETE Column stats: COMPLETE
+                                             |     value expressions:_col1 (type: int)
+                                             |     Select Operator [SEL_20]
+                                             |     |  outputColumnNames:["_col0","_col1"]
+                                             |     |  Statistics:Num rows: 1 Data size: 89 Basic stats: COMPLETE Column stats: COMPLETE
+                                             |     |<-Reducer 9 [SIMPLE_EDGE]
+                                             |        Reduce Output Operator [RS_19]
+                                             |           key expressions:_col3 (type: double), _col2 (type: bigint)
+                                             |           sort order:-+
+                                             |           Statistics:Num rows: 1 Data size: 105 Basic stats: COMPLETE Column stats: COMPLETE
+                                             |           value expressions:_col0 (type: string), _col1 (type: int)
+                                             |           Select Operator [SEL_18]
+                                             |              outputColumnNames:["_col0","_col1","_col2","_col3"]
+                                             |              Statistics:Num rows: 1 Data size: 105 Basic stats: COMPLETE Column stats: COMPLETE
+                                             |              Group By Operator [GBY_17]
+                                             |              |  aggregations:["sum(VALUE._col0)"]
+                                             |              |  keys:KEY._col0 (type: float), KEY._col1 (type: int), KEY._col2 (type: string)
+                                             |              |  outputColumnNames:["_col0","_col1","_col2","_col3"]
+                                             |              |  Statistics:Num rows: 1 Data size: 101 Basic stats: COMPLETE Column stats: COMPLETE
+                                             |              |<-Map 8 [SIMPLE_EDGE]
+                                             |                 Reduce Output Operator [RS_16]
+                                             |                    key expressions:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                                             |                    Map-reduce partition columns:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                                             |                    sort order:+++
+                                             |                    Statistics:Num rows: 1 Data size: 101 Basic stats: COMPLETE Column stats: COMPLETE
+                                             |                    value expressions:_col3 (type: bigint)
+                                             |                    Group By Operator [GBY_15]
+                                             |                       aggregations:["sum(_col1)"]
+                                             |                       keys:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                                             |                       outputColumnNames:["_col0","_col1","_col2","_col3"]
+                                             |                       Statistics:Num rows: 1 Data size: 101 Basic stats: COMPLETE Column stats: COMPLETE
+                                             |                       Select Operator [SEL_13]
+                                             |                          outputColumnNames:["_col0","_col1","_col2"]
+                                             |                          Statistics:Num rows: 3 Data size: 279 Basic stats: COMPLETE Column stats: COMPLETE
+                                             |                          Filter Operator [FIL_52]
+                                             |                             predicate:((((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0.0))) and key is not null) (type: boolean)
+                                             |                             Statistics:Num rows: 3 Data size: 279 Basic stats: COMPLETE Column stats: COMPLETE
+                                             |                             TableScan [TS_11]
+                                             |                                alias:cbo_t2
+                                             |                                Statistics:Num rows: 20 Data size: 262 Basic stats: COMPLETE Column stats: COMPLETE
+                                             |<-Reducer 3 [SIMPLE_EDGE]
+                                                Reduce Output Operator [RS_23]
+                                                   key expressions:_col0 (type: string)
+                                                   Map-reduce partition columns:_col0 (type: string)
+                                                   sort order:+
+                                                   Statistics:Num rows: 1 Data size: 97 Basic stats: COMPLETE Column stats: COMPLETE
+                                                   value expressions:_col1 (type: int), _col2 (type: bigint)
+                                                   Select Operator [SEL_9]
+                                                   |  outputColumnNames:["_col0","_col1","_col2"]
+                                                   |  Statistics:Num rows: 1 Data size: 97 Basic stats: COMPLETE Column stats: COMPLETE
+                                                   |<-Reducer 2 [SIMPLE_EDGE]
+                                                      Reduce Output Operator [RS_8]
+                                                         key expressions:_col0 (type: string)
+                                                         sort order:+
+                                                         Statistics:Num rows: 1 Data size: 97 Basic stats: COMPLETE Column stats: COMPLETE
+                                                         value expressions:_col1 (type: int), _col2 (type: bigint)
+                                                         Select Operator [SEL_7]
+                                                            outputColumnNames:["_col0","_col1","_col2"]
+                                                            Statistics:Num rows: 1 Data size: 97 Basic stats: COMPLETE Column stats: COMPLETE
+                                                            Group By Operator [GBY_6]
+                                                            |  aggregations:["sum(VALUE._col0)"]
+                                                            |  keys:KEY._col0 (type: float), KEY._col1 (type: int), KEY._col2 (type: string)
+                                                            |  outputColumnNames:["_col0","_col1","_col2","_col3"]
+                                                            |  Statistics:Num rows: 1 Data size: 101 Basic stats: COMPLETE Column stats: COMPLETE
+                                                            |<-Map 1 [SIMPLE_EDGE]
+                                                               Reduce Output Operator [RS_5]
+                                                                  key expressions:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                                                                  Map-reduce partition columns:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                                                                  sort order:+++
+                                                                  Statistics:Num rows: 1 Data size: 101 Basic stats: COMPLETE Column stats: COMPLETE
+                                                                  value expressions:_col3 (type: bigint)
+                                                                  Group By Operator [GBY_4]
+                                                                     aggregations:["sum(_col1)"]
+                                                                     keys:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                                                                     outputColumnNames:["_col0","_col1","_col2","_col3"]
+                                                                     Statistics:Num rows: 1 Data size: 101 Basic stats: COMPLETE Column stats: COMPLETE
+                                                                     Select Operator [SEL_2]
+                                                                        outputColumnNames:["_col0","_col1","_col2"]
+                                                                        Statistics:Num rows: 3 Data size: 279 Basic stats: COMPLETE Column stats: COMPLETE
+                                                                        Filter Operator [FIL_51]
+                                                                           predicate:((((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0.0))) and key is not null) (type: boolean)
+                                                                           Statistics:Num rows: 3 Data size: 279 Basic stats: COMPLETE Column stats: COMPLETE
+                                                                           TableScan [TS_0]
+                                                                              alias:cbo_t1
+                                                                              Statistics:Num rows: 20 Data size: 262 Basic stats: COMPLETE Column stats: COMPLETE
+
+PREHOOK: query: explain select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)  group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by b % c asc, b desc) cbo_t1 left outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)  group by c_float, cbo_t2.c_int, key  having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p left outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c  having cbo_t3.c_int > 0 and (c_int >=1 or c >= 1) and (c_int + c) >= 0  order by cbo_t3.c_int % c asc, cbo_t3.c_int desc
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)  group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by b % c asc, b desc) cbo_t1 left outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)  group by c_float, cbo_t2.c_int, key  having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p left outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c  having cbo_t3.c_int > 0 and (c_int >=1 or c >= 1) and (c_int + c) >= 0  order by cbo_t3.c_int % c asc, cbo_t3.c_int desc
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 5 <- Map 10 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+Reducer 9 <- Map 8 (SIMPLE_EDGE)
+
+Stage-0
+   Fetch Operator
+      limit:-1
+      Stage-1
+         Reducer 7
+         File Output Operator [FS_44]
+            compressed:false
+            Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+            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"}
+            Select Operator [SEL_43]
+            |  outputColumnNames:["_col0","_col1","_col2"]
+            |  Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+            |<-Reducer 6 [SIMPLE_EDGE]
+               Reduce Output Operator [RS_42]
+                  key expressions:(UDFToLong(_col0) % _col1) (type: bigint), _col0 (type: int)
+                  sort order:+-
+                  Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+                  value expressions:_col1 (type: bigint), _col2 (type: bigint)
+                  Group By Operator [GBY_40]
+                  |  aggregations:["count(VALUE._col0)"]
+                  |  keys:KEY._col0 (type: int), KEY._col1 (type: bigint)
+                  |  outputColumnNames:["_col0","_col1","_col2"]
+                  |  Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+                  |<-Reducer 5 [SIMPLE_EDGE]
+                     Reduce Output Operator [RS_39]
+                        key expressions:_col0 (type: int), _col1 (type: bigint)
+                        Map-reduce partition columns:_col0 (type: int), _col1 (type: bigint)
+                        sort order:++
+                        Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+                        value expressions:_col2 (type: bigint)
+                        Group By Operator [GBY_38]
+                           aggregations:["count()"]
+                           keys:_col0 (type: int), _col1 (type: bigint)
+                           outputColumnNames:["_col0","_col1","_col2"]
+                           Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+                           Select Operator [SEL_34]
+                              outputColumnNames:["_col0","_col1"]
+                              Statistics:Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE
+                              Filter Operator [FIL_48]
+                                 predicate:((((_col6 > 0) and ((_col6 >= 1) or (_col2 >= 1))) and ((UDFToLong(_col6) + _col2) >= 0)) and ((_col1 > 0) or (_col6 >= 0))) (type: boolean)
+                                 Statistics:Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE
+                                 Merge Join Operator [MERGEJOIN_53]
+                                 |  condition map:[{"":"Left Outer Join0 to 1"}]
+                                 |  keys:{"0":"_col0 (type: string)","1":"_col0 (type: string)"}
+                                 |  outputColumnNames:["_col1","_col2","_col6"]
+                                 |  Statistics:Num rows: 4 Data size: 64 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |<-Map 10 [SIMPLE_EDGE]
+                                 |  Reduce Output Operator [RS_31]
+                                 |     key expressions:_col0 (type: string)
+                                 |     Map-reduce partition columns:_col0 (type: string)
+                                 |     sort order:+
+                                 |     Statistics:Num rows: 20 Data size: 1602 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |     value expressions:_col1 (type: int)
+                                 |     Select Operator [SEL_29]
+                                 |        outputColumnNames:["_col0","_col1"]
+                                 |        Statistics:Num rows: 20 Data size: 1602 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |        TableScan [TS_28]
+                                 |           alias:cbo_t3
+                                 |           Statistics:Num rows: 20 Data size: 262 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |<-Reducer 4 [SIMPLE_EDGE]
+                                    Reduce Output Operator [RS_30]
+                                       key expressions:_col0 (type: string)
+                                       Map-reduce partition columns:_col0 (type: string)
+                                       sort order:+
+                                       Statistics:Num rows: 1 Data size: 101 Basic stats: COMPLETE Column stats: COMPLETE
+                                       value expressions:_col1 (type: int), _col2 (type: bigint)
+                                       Select Operator [SEL_27]
+                                          outputColumnNames:["_col0","_col1","_col2"]
+                                          Statistics:Num rows: 1 Data size: 101 Basic stats: COMPLETE Column stats: COMPLETE
+                                          Filter Operator [FIL_26]
+                                             predicate:((_col1 + _col4) >= 0) (type: boolean)
+                                             Statistics:Num rows: 1 Data size: 101 Basic stats: COMPLETE Column stats: COMPLETE
+                                             Merge Join Operator [MERGEJOIN_52]
+                                             |  condition map:[{"":"Left Outer Join0 to 1"}]
+                                             |  keys:{"0":"_col0 (type: string)","1":"_col0 (type: string)"}
+                                             |  outputColumnNames:["_col0","_col1","_col2","_col4"]
+                                             |  Statistics:Num rows: 1 Data size: 101 Basic stats: COMPLETE Column stats: COMPLETE
+                                             |<-Reducer 3 [SIMPLE_EDGE]
+                                             |  Reduce Output Operator [RS_23]
+                                             |     key expressions:_col0 (type: string)
+                                             |     Map-reduce partition columns:_col0 (type: string)
+                                             |     sort order:+
+                                             |     Statistics:Num rows: 1 Data size: 97 Basic stats: COMPLETE Column stats: COMPLETE
+                                             |     value expressions:_col1 (type: int), _col2 (type: bigint)
+                                             |     Select Operator [SEL_11]
+                                             |     |  outputColumnNames:["_col0","_col1","_col2"]
+                                             |     |  Statistics:Num rows: 1 Data size: 97 Basic stats: COMPLETE Column stats: COMPLETE
+                                             |     |<-Reducer 2 [SIMPLE_EDGE]
+                                             |        Reduce Output Operator [RS_10]
+                                             |           key expressions:_col3 (type: bigint), _col1 (type: int)
+                                             |           sort order:+-
+                                             |           Statistics:Num rows: 1 Data size: 105 Basic stats: COMPLETE Column stats: COMPLETE
+                                             |           value expressions:_col0 (type: string), _col2 (type: bigint)
+                                             |           Select Operator [SEL_9]
+                                             |              outputColumnNames:["_col0","_col1","_col2","_col3"]
+                                             |              Statistics:Num rows: 1 Data size: 105 Basic stats: COMPLETE Column stats: COMPLETE
+                                             |              Group By Operator [GBY_8]
+                                             |              |  aggregations:["sum(VALUE._col0)"]
+                                             |              |  keys:KEY._col0 (type: float), KEY._col1 (type: int), KEY._col2 (type: string)
+                                             |              |  outputColumnNames:["_col0","_col1","_col2","_col3"]
+                                             |              |  Statistics:Num rows: 1 Data size: 101 Basic stats: COMPLETE Column stats: COMPLETE
+                                             |              |<-Map 1 [SIMPLE_EDGE]
+                                             |                 Reduce Output Operator [RS_7]
+                                             |                    key expressions:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                                             |                    Map-reduce partition columns:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                                             |                    sort order:+++
+                                             |                    Statistics:Num rows: 1 Data size: 101 Basic stats: COMPLETE Column stats: COMPLETE
+                                             |                    value expressions:_col3 (type: bigint)
+                                             |                    Group By Operator [GBY_6]
+                                             |                       aggregations:["sum(_col1)"]
+                                             |                       keys:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                                             |                       outputColumnNames:["_col0","_col1","_col2","_col3"]
+                                             |                       Statistics:Num rows: 1 Data size: 101 Basic stats: COMPLETE Column stats: COMPLETE
+                                             |                       Select Operator [SEL_2]
+                                             |                          outputColumnNames:["_col0","_col1","_col2"]
+                                             |                          Statistics:Num rows: 1 Data size: 93 Basic stats: COMPLETE Column stats: COMPLETE
+                                             |                          Filter Operator [FIL_49]
+                                             |                             predicate:((((((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0.0))) and (c_float > 0.0)) and ((c_int >= 1) or (c_float >= 1.0))) and ((UDFToFloat(c_int) + c_float) >= 0.0)) (type: boolean)
+                                             |                             Statistics:Num rows: 1 Data size: 93 Basic stats: COMPLETE Column stats: COMPLETE
+                                             |                             TableScan [TS_0]
+                                             |                                alias:cbo_t1
+                                             |                                Statistics:Num rows: 20 Data size: 262 Basic stats: COMPLETE Column stats: COMPLETE
+                                             |<-Reducer 9 [SIMPLE_EDGE]
+                                                Reduce Output Operator [RS_24]
+                                                   key expressions:_col0 (type: string)
+                                                   Map-reduce partition columns:_col0 (type: string)
+                                                   sort order:+
+                                                   Statistics:Num rows: 1 Data size: 89 Basic stats: COMPLETE Column stats: COMPLETE
+                                                   value expressions:_col1 (type: int)
+                                                   Select Operator [SEL_22]
+                                                      outputColumnNames:["_col0","_col1"]
+                                                      Statistics:Num rows: 1 Data size: 89 Basic stats: COMPLETE Column stats: COMPLETE
+                                                      Group By Operator [GBY_21]
+                                                      |  keys:KEY._col0 (type: float), KEY._col1 (type: int), KEY._col2 (type: string)
+                                                      |  outputColumnNames:["_col0","_col1","_col2"]
+                                                      |  Statistics:Num rows: 1 Data size: 93 Basic stats: COMPLETE Column stats: COMPLETE
+                                                      |<-Map 8 [SIMPLE_EDGE]
+                                                         Reduce Output Operator [RS_20]
+                                                            key expressions:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                                                            Map-reduce partition columns:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                                                            sort order:+++
+                                                            Statistics:Num rows: 1 Data size: 93 Basic stats: COMPLETE Column stats: COMPLETE
+                                                            Group By Operator [GBY_19]
+                                                               keys:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                                                               outputColumnNames:["_col0","_col1","_col2"]
+                                                               Statistics:Num rows: 1 Data size: 93 Basic stats: COMPLETE Column stats: COMPLETE
+                                                               Select Operator [SEL_15]
+                                                                  outputColumnNames:["_col0","_col1","_col2"]
+                                                                  Statistics:Num rows: 1 Data size: 93 Basic stats: COMPLETE Column stats: COMPLETE
+                                                                  Filter Operator [FIL_50]
+                                                                     predicate:((((((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0.0))) and (c_float > 0.0)) and ((c_int >= 1) or (c_float >= 1.0))) and ((UDFToFloat(c_int) + c_float) >= 0.0)) (type: boolean)
+                                                                     Statistics:Num rows: 1 Data size: 93 Basic stats: COMPLETE Column stats: COMPLETE
+                                                                     TableScan [TS_13]
+                                                                        alias:cbo_t2
+                                                                        Statistics:Num rows: 20 Data size: 262 Basic stats: COMPLETE Column stats: COMPLETE
+
+PREHOOK: query: explain select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)  group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by b+c, a desc) cbo_t1 right outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)  group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p right outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 2) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)  group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by b+c, a desc) cbo_t1 right outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)  group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0) cbo_t2 on cbo_t1.a=p right outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 2) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 8 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 7 <- Map 6 (SIMPLE_EDGE)
+
+Stage-0
+   Fetch Operator
+      limit:-1
+      Stage-1
+         Reducer 5
+         File Output Operator [FS_36]
+            compressed:false
+            Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+            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"}
+            Group By Operator [GBY_34]
+            |  aggregations:["count(VALUE._col0)"]
+            |  keys:KEY._col0 (type: int), KEY._col1 (type: bigint)
+            |  outputColumnNames:["_col0","_col1","_col2"]
+            |  Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+            |<-Reducer 4 [SIMPLE_EDGE]
+               Reduce Output Operator [RS_33]
+                  key expressions:_col0 (type: int), _col1 (type: bigint)
+                  Map-reduce partition columns:_col0 (type: int), _col1 (type: bigint)
+                  sort order:++
+                  Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+                  value expressions:_col2 (type: bigint)
+                  Group By Operator [GBY_32]
+                     aggregations:["count()"]
+                     keys:_col0 (type: int), _col1 (type: bigint)
+                     outputColumnNames:["_col0","_col1","_col2"]
+                     Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+                     Select Operator [SEL_30]
+                        outputColumnNames:["_col0","_col1"]
+                        Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+                        Filter Operator [FIL_29]
+                           predicate:(((_col1 + _col4) >= 2) and ((_col1 > 0) or (_col6 >= 0))) (type: boolean)
+                           Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+                           Merge Join Operator [MERGEJOIN_41]
+                           |  condition map:[{"":"Right Outer Join0 to 1"},{"":"Right Outer Join0 to 2"}]
+                           |  keys:{"0":"_col0 (type: string)","1":"_col0 (type: string)","2":"_col0 (type: string)"}
+                           |  outputColumnNames:["_col1","_col2","_col4","_col6"]
+                           |  Statistics:Num rows: 4 Data size: 80 Basic stats: COMPLETE Column stats: COMPLETE
+                           |<-Map 8 [SIMPLE_EDGE]
+                           |  Reduce Output Operator [RS_27]
+                           |     key expressions:_col0 (type: string)
+                           |     Map-reduce partition columns:_col0 (type: string)
+                           |     sort order:+
+                           |     Statistics:Num rows: 20 Data size: 1602 Basic stats: COMPLETE Column stats: COMPLETE
+                           |     value expressions:_col1 (type: int)
+                           |     Select Operator [SEL_24]
+                           |        outputColumnNames:["_col0","_col1"]
+                           |        Statistics:Num rows: 20 Data size: 1602 Basic stats: COMPLETE Column stats: COMPLETE
+                           |        TableScan [TS_23]
+                           |           alias:cbo_t3
+                           |           Statistics:Num rows: 20 Data size: 262 Basic stats: COMPLETE Column stats: COMPLETE
+                           |<-Reducer 3 [SIMPLE_EDGE]
+                           |  Reduce Output Operator [RS_25]
+                           |     key expressions:_col0 (type: string)
+                           |     Map-reduce partition columns:_col0 (type: string)
+                           |     sort order:+
+                           |     Statistics:Num rows: 1 Data size: 97 Basic stats: COMPLETE Column stats: COMPLETE
+                           |     value expressions:_col1 (type: int), _col2 (type: bigint)
+                           |     Select Operator [SEL_11]
+                           |     |  outputColumnNames:["_col0","_col1","_col2"]
+                           |     |  Statistics:Num rows: 1 Data size: 97 Basic stats: COMPLETE Column stats: COMPLETE
+                           |     |<-Reducer 2 [SIMPLE_EDGE]
+                           |        Reduce Output Operator [RS_10]
+                           |           key expressions:_col3 (type: bigint), _col0 (type: string)
+                           |           sort order:+-
+                           |           Statistics:Num rows: 1 Data size: 105 Basic stats: COMPLETE Column stats: COMPLETE
+                           |           value expressions:_col1 (type: int), _col2 (type: bigint)
+                           |           Select Operator [SEL_9]
+                           |              outputColumnNames:["_col0","_col1","_col2","_col3"]
+                           |              Statistics:Num rows: 1 Data size: 105 Basic stats: COMPLETE Column stats: COMPLETE
+                           |              Group By Operator [GBY_8]
+                           |              |  aggregations:["sum(VALUE._col0)"]
+                           |              |  keys:KEY._col0 (type: float), KEY._col1 (type: int), KEY._col2 (type: string)
+                           |              |  outputColumnNames:["_col0","_col1","_col2","_col3"]
+                           |              |  Statistics:Num rows: 1 Data size: 101 Basic stats: COMPLETE Column stats: COMPLETE
+                           |              |<-Map 1 [SIMPLE_EDGE]
+                           |                 Reduce Output Operator [RS_7]
+                           |                    key expressions:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                           |                    Map-reduce partition columns:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                           |                    sort order:+++
+                           |                    Statistics:Num rows: 1 Data size: 101 Basic stats: COMPLETE Column stats: COMPLETE
+                           |                    value expressions:_col3 (type: bigint)
+                           |                    Group By Operator [GBY_6]
+                           |                       aggregations:["sum(_col1)"]
+                           |                       keys:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                           |                       outputColumnNames:["_col0","_col1","_col2","_col3"]
+                           |                       Statistics:Num rows: 1 Data size: 101 Basic stats: COMPLETE Column stats: COMPLETE
+                           |                       Select Operator [SEL_2]
+                           |                          outputColumnNames:["_col0","_col1","_col2"]
+                           |                          Statistics:Num rows: 1 Data size: 93 Basic stats: COMPLETE Column stats: COMPLETE
+                           |                          Filter Operator [FIL_39]
+                           |                             predicate:((((((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0.0))) and (c_float > 0.0)) and ((c_int >= 1) or (c_float >= 1.0))) and ((UDFToFloat(c_int) + c_float) >= 0.0)) (type: boolean)
+                           |                             Statistics:Num rows: 1 Data size: 93 Basic stats: COMPLETE Column stats: COMPLETE
+                           |                             TableScan [TS_0]
+                           |                                alias:cbo_t1
+                           |                                Statistics:Num rows: 20 Data size: 262 Basic stats: COMPLETE Column stats: COMPLETE
+                           |<-Reducer 7 [SIMPLE_EDGE]
+                              Reduce Output Operator [RS_26]
+                                 key expressions:_col0 (type: string)
+                                 Map-reduce partition columns:_col0 (type: string)
+                                 sort order:+
+                                 Statistics:Num rows: 1 Data size: 89 Basic stats: COMPLETE Column stats: COMPLETE
+                                 value expressions:_col1 (type: int)
+                                 Select Operator [SEL_22]
+                                    outputColumnNames:["_col0","_col1"]
+                                    Statistics:Num rows: 1 Data size: 89 Basic stats: COMPLETE Column stats: COMPLETE
+                                    Group By Operator [GBY_21]
+                                    |  keys:KEY._col0 (type: float), KEY._col1 (type: int), KEY._col2 (type: string)
+                                    |  outputColumnNames:["_col0","_col1","_col2"]
+                                    |  Statistics:Num rows: 1 Data size: 93 Basic stats: COMPLETE Column stats: COMPLETE
+                                    |<-Map 6 [SIMPLE_EDGE]
+                                       Reduce Output Operator [RS_20]
+                                          key expressions:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                                          Map-reduce partition columns:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                                          sort order:+++
+                                          Statistics:Num rows: 1 Data size: 93 Basic stats: COMPLETE Column stats: COMPLETE
+                                          Group By Operator [GBY_19]
+                                             keys:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                                             outputColumnNames:["_col0","_col1","_col2"]
+                                             Statistics:Num rows: 1 Data size: 93 Basic stats: COMPLETE Column stats: COMPLETE
+                                             Select Operator [SEL_15]
+                                                outputColumnNames:["_col0","_col1","_col2"]
+                                                Statistics:Num rows: 1 Data size: 93 Basic stats: COMPLETE Column stats: COMPLETE
+                                                Filter Operator [FIL_40]
+                                                   predicate:((((((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0.0))) and (c_float > 0.0)) and ((c_int >= 1) or (c_float >= 1.0))) and ((UDFToFloat(c_int) + c_float) >= 0.0)) (type: boolean)
+                                                   Statistics:Num rows: 1 Data size: 93 Basic stats: COMPLETE Column stats: COMPLETE
+                                                   TableScan [TS_13]
+                                                      alias:cbo_t2
+                                                      Statistics:Num rows: 20 Data size: 262 Basic stats: COMPLETE Column stats: COMPLETE
+
+PREHOOK: query: explain select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)  group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by c+a desc) cbo_t1 full outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)  group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by p+q desc, r asc) cbo_t2 on cbo_t1.a=p full outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c having cbo_t3.c_int > 0 and (c_int >=1 or c >= 1) and (c_int + c) >= 0 order by cbo_t3.c_int
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select cbo_t3.c_int, c, count(*) from (select key as a, c_int+1 as b, sum(c_int) as c from cbo_t1 where (cbo_t1.c_int + 1 >= 0) and (cbo_t1.c_int > 0 or cbo_t1.c_float >= 0)  group by c_float, cbo_t1.c_int, key having cbo_t1.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by c+a desc) cbo_t1 full outer join (select key as p, c_int+1 as q, sum(c_int) as r from cbo_t2 where (cbo_t2.c_int + 1 >= 0) and (cbo_t2.c_int > 0 or cbo_t2.c_float >= 0)  group by c_float, cbo_t2.c_int, key having cbo_t2.c_float > 0 and (c_int >=1 or c_float >= 1) and (c_int + c_float) >= 0 order by p+q desc, r asc) cbo_t2 on cbo_t1.a=p full outer join cbo_t3 on cbo_t1.a=key where (b + cbo_t2.q >= 0) and (b > 0 or c_int >= 0) group by cbo_t3.c_int, c having cbo_t3.c_int > 0 and (c_int >=1 or c >= 1) and (c_int + c) >= 0 order by cbo_t3.c_int
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 8 <- Map 7 (SIMPLE_EDGE)
+Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
+
+Stage-0
+   Fetch Operator
+      limit:-1
+      Stage-1
+         Reducer 6
+         File Output Operator [FS_43]
+            compressed:false
+            Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+            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"}
+            Select Operator [SEL_42]
+            |  outputColumnNames:["_col0","_col1","_col2"]
+            |  Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+            |<-Reducer 5 [SIMPLE_EDGE]
+               Reduce Output Operator [RS_41]
+                  key expressions:_col0 (type: int)
+                  sort order:+
+                  Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+                  value expressions:_col1 (type: bigint), _col2 (type: bigint)
+                  Group By Operator [GBY_39]
+                  |  aggregations:["count(VALUE._col0)"]
+                  |  keys:KEY._col0 (type: int), KEY._col1 (type: bigint)
+                  |  outputColumnNames:["_col0","_col1","_col2"]
+                  |  Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+                  |<-Reducer 4 [SIMPLE_EDGE]
+                     Reduce Output Operator [RS_38]
+                        key expressions:_col0 (type: int), _col1 (type: bigint)
+                        Map-reduce partition columns:_col0 (type: int), _col1 (type: bigint)
+                        sort order:++
+                        Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+                        value expressions:_col2 (type: bigint)
+                        Group By Operator [GBY_37]
+                           aggregations:["count()"]
+                           keys:_col0 (type: int), _col1 (type: bigint)
+                           outputColumnNames:["_col0","_col1","_col2"]
+                           Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+                           Select Operator [SEL_33]
+                              outputColumnNames:["_col0","_col1"]
+                              Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+                              Filter Operator [FIL_45]
+                                 predicate:(((((_col6 > 0) and ((_col6 >= 1) or (_col2 >= 1))) and ((UDFToLong(_col6) + _col2) >= 0)) and ((_col1 + _col4) >= 0)) and ((_col1 > 0) or (_col6 >= 0))) (type: boolean)
+                                 Statistics:Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE
+                                 Merge Join Operator [MERGEJOIN_48]
+                                 |  condition map:[{"":"Outer Join 0 to 1"},{"":"Outer Join 0 to 2"}]
+                                 |  keys:{"0":"_col0 (type: string)","1":"_col0 (type: string)","2":"_col0 (type: string)"}
+                                 |  outputColumnNames:["_col1","_col2","_col4","_col6"]
+                                 |  Statistics:Num rows: 4 Data size: 80 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |<-Map 10 [SIMPLE_EDGE]
+                                 |  Reduce Output Operator [RS_30]
+                                 |     key expressions:_col0 (type: string)
+                                 |     Map-reduce partition columns:_col0 (type: string)
+                                 |     sort order:+
+                                 |     Statistics:Num rows: 20 Data size: 1602 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |     value expressions:_col1 (type: int)
+                                 |     Select Operator [SEL_27]
+                                 |        outputColumnNames:["_col0","_col1"]
+                                 |        Statistics:Num rows: 20 Data size: 1602 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |        TableScan [TS_26]
+                                 |           alias:cbo_t3
+                                 |           Statistics:Num rows: 20 Data size: 262 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |<-Reducer 3 [SIMPLE_EDGE]
+                                 |  Reduce Output Operator [RS_28]
+                                 |     key expressions:_col0 (type: string)
+                                 |     Map-reduce partition columns:_col0 (type: string)
+                                 |     sort order:+
+                                 |     Statistics:Num rows: 1 Data size: 97 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |     value expressions:_col1 (type: int), _col2 (type: bigint)
+                                 |     Select Operator [SEL_11]
+                                 |     |  outputColumnNames:["_col0","_col1","_col2"]
+                                 |     |  Statistics:Num rows: 1 Data size: 97 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |     |<-Reducer 2 [SIMPLE_EDGE]
+                                 |        Reduce Output Operator [RS_10]
+                                 |           key expressions:_col3 (type: double)
+                                 |           sort order:-
+                                 |           Statistics:Num rows: 1 Data size: 105 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |           value expressions:_col0 (type: string), _col1 (type: int), _col2 (type: bigint)
+                                 |           Select Operator [SEL_9]
+                                 |              outputColumnNames:["_col0","_col1","_col2","_col3"]
+                                 |              Statistics:Num rows: 1 Data size: 105 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |              Group By Operator [GBY_8]
+                                 |              |  aggregations:["sum(VALUE._col0)"]
+                                 |              |  keys:KEY._col0 (type: float), KEY._col1 (type: int), KEY._col2 (type: string)
+                                 |              |  outputColumnNames:["_col0","_col1","_col2","_col3"]
+                                 |              |  Statistics:Num rows: 1 Data size: 101 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |              |<-Map 1 [SIMPLE_EDGE]
+                                 |                 Reduce Output Operator [RS_7]
+                                 |                    key expressions:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                                 |                    Map-reduce partition columns:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                                 |                    sort order:+++
+                                 |                    Statistics:Num rows: 1 Data size: 101 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |                    value expressions:_col3 (type: bigint)
+                                 |                    Group By Operator [GBY_6]
+                                 |                       aggregations:["sum(_col1)"]
+                                 |                       keys:_col0 (type: float), _col1 (type: int), _col2 (type: string)
+                                 |                       outputColumnNames:["_col0","_col1","_col2","_col3"]
+                                 |                       Statistics:Num rows: 1 Data size: 101 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |                       Select Operator [SEL_2]
+                                 |                          outputColumnNames:["_col0","_col1","_col2"]
+                                 |                          Statistics:Num rows: 1 Data size: 93 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |                          Filter Operator [FIL_46]
+                                 |                             predicate:((((((c_int + 1) >= 0) and ((c_int > 0) or (c_float >= 0.0))) and (c_float > 0.0)) and ((c_int >= 1) or (c_float >= 1.0))) and ((UDFToFloat(c_int) + c_float) >= 0.0)) (type: boolean)
+                                 |                             Statistics:Num rows: 1 Data size: 93 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |                             TableScan [TS_0]
+                                 |                                alias:cbo_t1
+                                 |                                Statistics:Num rows: 20 Data size: 262 Basic stats: COMPLETE Column stats: COMPLETE
+                                 |<-Reducer 9 [SIMPLE_EDGE]
+                                    Reduce Output Operator [RS_29]
+                                       key expressions:_col0 (type: string)


<TRUNCATED>

[2/2] hive git commit: HIVE-11869: LLAP: constprog_dpp.q, explainuser_1.q showing explain diff (Prasanth Jaychandran)

Posted by pr...@apache.org.
HIVE-11869: LLAP: constprog_dpp.q,explainuser_1.q showing explain diff (Prasanth Jaychandran)


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

Branch: refs/heads/llap
Commit: 0697fd92ae132f50e8a8c01844b819b22e95e6cf
Parents: 1067c1b
Author: Prasanth Jayachandran <j....@gmail.com>
Authored: Thu Sep 17 17:02:11 2015 -0500
Committer: Prasanth Jayachandran <j....@gmail.com>
Committed: Thu Sep 17 17:02:11 2015 -0500

----------------------------------------------------------------------
 .../test/queries/clientpositive/constprog_dpp.q |    3 +-
 .../clientpositive/llap/constprog_dpp.q.out     |  113 +
 .../clientpositive/llap/explainuser_1.q.out     | 8940 ++++++++++++++++++
 3 files changed, 9055 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/0697fd92/ql/src/test/queries/clientpositive/constprog_dpp.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/constprog_dpp.q b/ql/src/test/queries/clientpositive/constprog_dpp.q
index f1c9b13..db4ca5f 100644
--- a/ql/src/test/queries/clientpositive/constprog_dpp.q
+++ b/ql/src/test/queries/clientpositive/constprog_dpp.q
@@ -1,6 +1,7 @@
 set hive.execution.engine=tez;
 set hive.optimize.constant.propagation=true;
 set hive.tez.dynamic.partition.pruning=true;
+set hive.explain.user=true;
 
 drop table if exists tb1;
 create table tb1 (id int);
@@ -14,4 +15,4 @@ left outer join
 (select id from tb2
 union all
 select 2 as id from tb2 limit 1) b
-on a.id=b.id;
\ No newline at end of file
+on a.id=b.id;

http://git-wip-us.apache.org/repos/asf/hive/blob/0697fd92/ql/src/test/results/clientpositive/llap/constprog_dpp.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/constprog_dpp.q.out b/ql/src/test/results/clientpositive/llap/constprog_dpp.q.out
new file mode 100644
index 0000000..0bc964b
--- /dev/null
+++ b/ql/src/test/results/clientpositive/llap/constprog_dpp.q.out
@@ -0,0 +1,113 @@
+PREHOOK: query: drop table if exists tb1
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists tb1
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table tb1 (id int)
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@tb1
+POSTHOOK: query: create table tb1 (id int)
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@tb1
+PREHOOK: query: drop table if exists tb2
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists tb2
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table tb2 (id smallint)
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@tb2
+POSTHOOK: query: create table tb2 (id smallint)
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@tb2
+PREHOOK: query: explain
+select a.id from tb1 a
+left outer join
+(select id from tb2
+union all
+select 2 as id from tb2 limit 1) b
+on a.id=b.id
+PREHOOK: type: QUERY
+POSTHOOK: query: explain
+select a.id from tb1 a
+left outer join
+(select id from tb2
+union all
+select 2 as id from tb2 limit 1) b
+on a.id=b.id
+POSTHOOK: type: QUERY
+Plan not optimized by CBO due to missing statistics. Please check log for more details.
+
+Vertex dependency in root stage
+Map 1 <- Union 2 (CONTAINS)
+Map 5 <- Union 2 (CONTAINS)
+Reducer 3 <- Union 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 6 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+
+Stage-0
+   Fetch Operator
+      limit:-1
+      Stage-1
+         Reducer 4
+         File Output Operator [FS_16]
+            compressed:false
+            Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL 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"}
+            Merge Join Operator [MERGEJOIN_20]
+            |  condition map:[{"":"Left Outer Join0 to 1"}]
+            |  keys:{"0":"id (type: int)","1":"_col0 (type: int)"}
+            |  outputColumnNames:["_col0"]
+            |  Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+            |<-Map 6 [SIMPLE_EDGE]
+            |  Reduce Output Operator [RS_12]
+            |     key expressions:id (type: int)
+            |     Map-reduce partition columns:id (type: int)
+            |     sort order:+
+            |     Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+            |     TableScan [TS_11]
+            |        alias:a
+            |        Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+            |<-Reducer 3 [SIMPLE_EDGE]
+               Reduce Output Operator [RS_13]
+                  key expressions:_col0 (type: int)
+                  Map-reduce partition columns:_col0 (type: int)
+                  sort order:+
+                  Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE
+                  Limit [LIM_10]
+                     Number of rows:1
+                     Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE
+                     Select Operator [SEL_9]
+                     |  outputColumnNames:["_col0"]
+                     |  Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE
+                     |<-Union 2 [SIMPLE_EDGE]
+                        |<-Map 1 [CONTAINS]
+                        |  Reduce Output Operator [RS_8]
+                        |     sort order:
+                        |     Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE
+                        |     value expressions:_col0 (type: int)
+                        |     Limit [LIM_7]
+                        |        Number of rows:1
+                        |        Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE
+                        |        Select Operator [SEL_1]
+                        |           outputColumnNames:["_col0"]
+                        |           Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+                        |           TableScan [TS_0]
+                        |              alias:tb2
+                        |              Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+                        |<-Map 5 [CONTAINS]
+                           Reduce Output Operator [RS_8]
+                              sort order:
+                              Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE
+                              value expressions:_col0 (type: int)
+                              Limit [LIM_7]
+                                 Number of rows:1
+                                 Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE
+                                 Select Operator [SEL_3]
+                                    outputColumnNames:["_col0"]
+                                    Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE
+                                    TableScan [TS_2]
+                                       alias:tb2
+                                       Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE
+