http://git-wip-us.apache.org/repos/asf/hive/blob/196c671a/ql/src/test/results/clientpositive/stat_estimate_related_col.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/stat_estimate_related_col.q.out 
b/ql/src/test/results/clientpositive/stat_estimate_related_col.q.out
new file mode 100644
index 0000000..8cc0fbc
--- /dev/null
+++ b/ql/src/test/results/clientpositive/stat_estimate_related_col.q.out
@@ -0,0 +1,784 @@
+PREHOOK: query: drop table if exists t1
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists t1
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: drop table if exists t8
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists t8
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table t1 (a integer,b integer)
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@t1
+POSTHOOK: query: create table t1 (a integer,b integer)
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@t1
+PREHOOK: query: create table t8 like t1
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@t8
+POSTHOOK: query: create table t8 like t1
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@t8
+PREHOOK: query: insert into t1 values (1,1),(2,2),(3,3),(4,4),(5,5)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@t1
+POSTHOOK: query: insert into t1 values (1,1),(2,2),(3,3),(4,4),(5,5)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@t1
+POSTHOOK: Lineage: t1.a SCRIPT []
+POSTHOOK: Lineage: t1.b SCRIPT []
+PREHOOK: query: insert into t8
+select * from t1 union all select * from t1 union all select * from t1 union 
all select * from t1 union all
+select * from t1 union all select * from t1 union all select * from t1 union 
all select * from t1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t1
+PREHOOK: Output: default@t8
+POSTHOOK: query: insert into t8
+select * from t1 union all select * from t1 union all select * from t1 union 
all select * from t1 union all
+select * from t1 union all select * from t1 union all select * from t1 union 
all select * from t1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1
+POSTHOOK: Output: default@t8
+POSTHOOK: Lineage: t8.a EXPRESSION [(t1)t1.FieldSchema(name:a, type:int, 
comment:null), ]
+POSTHOOK: Lineage: t8.b EXPRESSION [(t1)t1.FieldSchema(name:b, type:int, 
comment:null), ]
+PREHOOK: query: analyze table t1 compute statistics for columns
+PREHOOK: type: ANALYZE_TABLE
+PREHOOK: Input: default@t1
+PREHOOK: Output: default@t1
+#### A masked pattern was here ####
+POSTHOOK: query: analyze table t1 compute statistics for columns
+POSTHOOK: type: ANALYZE_TABLE
+POSTHOOK: Input: default@t1
+POSTHOOK: Output: default@t1
+#### A masked pattern was here ####
+PREHOOK: query: analyze table t8 compute statistics for columns
+PREHOOK: type: ANALYZE_TABLE
+PREHOOK: Input: default@t8
+PREHOOK: Output: default@t8
+#### A masked pattern was here ####
+POSTHOOK: query: analyze table t8 compute statistics for columns
+POSTHOOK: type: ANALYZE_TABLE
+POSTHOOK: Input: default@t8
+POSTHOOK: Output: default@t8
+#### A masked pattern was here ####
+PREHOOK: query: select sum(a) from t8 where b in (2,3) group by b
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t8
+#### A masked pattern was here ####
+POSTHOOK: query: select sum(a) from t8 where b in (2,3) group by b
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t8
+#### A masked pattern was here ####
+PREHOOK: query: explain analyze select sum(a) from t8 where b in (2,3) group 
by b
+PREHOOK: type: QUERY
+POSTHOOK: query: explain analyze select sum(a) from t8 where b in (2,3) group 
by b
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: t8
+            Statistics: Num rows: 40/40 Data size: 320 Basic stats: COMPLETE 
Column stats: COMPLETE
+            Filter Operator
+              predicate: (b) IN (2, 3) (type: boolean)
+              Statistics: Num rows: 16/16 Data size: 128 Basic stats: COMPLETE 
Column stats: COMPLETE
+              Group By Operator
+                aggregations: sum(a)
+                keys: b (type: int)
+                mode: hash
+                outputColumnNames: _col0, _col1
+                Statistics: Num rows: 2/2 Data size: 24 Basic stats: COMPLETE 
Column stats: COMPLETE
+                Reduce Output Operator
+                  key expressions: _col0 (type: int)
+                  sort order: +
+                  Map-reduce partition columns: _col0 (type: int)
+                  Statistics: Num rows: 2/2 Data size: 24 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  value expressions: _col1 (type: bigint)
+      Execution mode: vectorized
+      Reduce Operator Tree:
+        Group By Operator
+          aggregations: sum(VALUE._col0)
+          keys: KEY._col0 (type: int)
+          mode: mergepartial
+          outputColumnNames: _col0, _col1
+          Statistics: Num rows: 2/2 Data size: 24 Basic stats: COMPLETE Column 
stats: COMPLETE
+          Select Operator
+            expressions: _col1 (type: bigint)
+            outputColumnNames: _col0
+            Statistics: Num rows: 2/2 Data size: 16 Basic stats: COMPLETE 
Column stats: COMPLETE
+            File Output Operator
+              compressed: false
+              Statistics: Num rows: 2/2 Data size: 16 Basic stats: COMPLETE 
Column stats: COMPLETE
+              table:
+                  input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                  output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: select sum(a) from t8 where b=2 group by b
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t8
+#### A masked pattern was here ####
+POSTHOOK: query: select sum(a) from t8 where b=2 group by b
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t8
+#### A masked pattern was here ####
+PREHOOK: query: explain analyze select sum(a) from t8 where b=2 group by b
+PREHOOK: type: QUERY
+POSTHOOK: query: explain analyze select sum(a) from t8 where b=2 group by b
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: t8
+            Statistics: Num rows: 40/40 Data size: 320 Basic stats: COMPLETE 
Column stats: COMPLETE
+            Filter Operator
+              predicate: (b = 2) (type: boolean)
+              Statistics: Num rows: 8/8 Data size: 64 Basic stats: COMPLETE 
Column stats: COMPLETE
+              Select Operator
+                expressions: a (type: int)
+                outputColumnNames: _col1
+                Statistics: Num rows: 8/8 Data size: 64 Basic stats: COMPLETE 
Column stats: COMPLETE
+                Group By Operator
+                  aggregations: sum(_col1)
+                  keys: 2 (type: int)
+                  mode: hash
+                  outputColumnNames: _col0, _col1
+                  Statistics: Num rows: 1/1 Data size: 12 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Reduce Output Operator
+                    key expressions: _col0 (type: int)
+                    sort order: +
+                    Map-reduce partition columns: _col0 (type: int)
+                    Statistics: Num rows: 1/1 Data size: 12 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    value expressions: _col1 (type: bigint)
+      Execution mode: vectorized
+      Reduce Operator Tree:
+        Group By Operator
+          aggregations: sum(VALUE._col0)
+          keys: KEY._col0 (type: int)
+          mode: mergepartial
+          outputColumnNames: _col0, _col1
+          Statistics: Num rows: 1/1 Data size: 12 Basic stats: COMPLETE Column 
stats: COMPLETE
+          Select Operator
+            expressions: _col1 (type: bigint)
+            outputColumnNames: _col0
+            Statistics: Num rows: 1/1 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
+            File Output Operator
+              compressed: false
+              Statistics: Num rows: 1/1 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
+              table:
+                  input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                  output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: select sum(a) from t1 where 2=b and b=2 group by b
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t1
+#### A masked pattern was here ####
+POSTHOOK: query: select sum(a) from t1 where 2=b and b=2 group by b
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1
+#### A masked pattern was here ####
+PREHOOK: query: explain analyze select sum(a) from t1 where 2=b and b=2 group 
by b
+PREHOOK: type: QUERY
+POSTHOOK: query: explain analyze select sum(a) from t1 where 2=b and b=2 group 
by b
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: t1
+            Statistics: Num rows: 5/5 Data size: 40 Basic stats: COMPLETE 
Column stats: COMPLETE
+            Filter Operator
+              predicate: (b = 2) (type: boolean)
+              Statistics: Num rows: 1/1 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
+              Select Operator
+                expressions: a (type: int)
+                outputColumnNames: _col1
+                Statistics: Num rows: 1/1 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
+                Group By Operator
+                  aggregations: sum(_col1)
+                  keys: 2 (type: int)
+                  mode: hash
+                  outputColumnNames: _col0, _col1
+                  Statistics: Num rows: 1/1 Data size: 12 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Reduce Output Operator
+                    key expressions: _col0 (type: int)
+                    sort order: +
+                    Map-reduce partition columns: _col0 (type: int)
+                    Statistics: Num rows: 1/1 Data size: 12 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    value expressions: _col1 (type: bigint)
+      Execution mode: vectorized
+      Reduce Operator Tree:
+        Group By Operator
+          aggregations: sum(VALUE._col0)
+          keys: KEY._col0 (type: int)
+          mode: mergepartial
+          outputColumnNames: _col0, _col1
+          Statistics: Num rows: 1/1 Data size: 12 Basic stats: COMPLETE Column 
stats: COMPLETE
+          Select Operator
+            expressions: _col1 (type: bigint)
+            outputColumnNames: _col0
+            Statistics: Num rows: 1/1 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
+            File Output Operator
+              compressed: false
+              Statistics: Num rows: 1/1 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
+              table:
+                  input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                  output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: select sum(a) from t1 where b in (2,3) and b=2 group by b
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t1
+#### A masked pattern was here ####
+POSTHOOK: query: select sum(a) from t1 where b in (2,3) and b=2 group by b
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1
+#### A masked pattern was here ####
+PREHOOK: query: explain analyze select sum(a) from t1 where b in (2,3) and b=2 
group by b
+PREHOOK: type: QUERY
+POSTHOOK: query: explain analyze select sum(a) from t1 where b in (2,3) and 
b=2 group by b
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: t1
+            Statistics: Num rows: 5/5 Data size: 40 Basic stats: COMPLETE 
Column stats: COMPLETE
+            Filter Operator
+              predicate: ((b = 2) and (b) IN (2, 3)) (type: boolean)
+              Statistics: Num rows: 1/1 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
+              Select Operator
+                expressions: a (type: int)
+                outputColumnNames: _col1
+                Statistics: Num rows: 1/1 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
+                Group By Operator
+                  aggregations: sum(_col1)
+                  keys: 2 (type: int)
+                  mode: hash
+                  outputColumnNames: _col0, _col1
+                  Statistics: Num rows: 1/1 Data size: 12 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Reduce Output Operator
+                    key expressions: _col0 (type: int)
+                    sort order: +
+                    Map-reduce partition columns: _col0 (type: int)
+                    Statistics: Num rows: 1/1 Data size: 12 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    value expressions: _col1 (type: bigint)
+      Execution mode: vectorized
+      Reduce Operator Tree:
+        Group By Operator
+          aggregations: sum(VALUE._col0)
+          keys: KEY._col0 (type: int)
+          mode: mergepartial
+          outputColumnNames: _col0, _col1
+          Statistics: Num rows: 1/1 Data size: 12 Basic stats: COMPLETE Column 
stats: COMPLETE
+          Select Operator
+            expressions: _col1 (type: bigint)
+            outputColumnNames: _col0
+            Statistics: Num rows: 1/1 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
+            File Output Operator
+              compressed: false
+              Statistics: Num rows: 1/1 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
+              table:
+                  input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                  output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: select sum(a) from t8 where b in (2,3) and b=2 group by b
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t8
+#### A masked pattern was here ####
+POSTHOOK: query: select sum(a) from t8 where b in (2,3) and b=2 group by b
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t8
+#### A masked pattern was here ####
+PREHOOK: query: explain analyze select sum(a) from t8 where b in (2,3) and b=2 
group by b
+PREHOOK: type: QUERY
+POSTHOOK: query: explain analyze select sum(a) from t8 where b in (2,3) and 
b=2 group by b
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: t8
+            Statistics: Num rows: 40/40 Data size: 320 Basic stats: COMPLETE 
Column stats: COMPLETE
+            Filter Operator
+              predicate: ((b = 2) and (b) IN (2, 3)) (type: boolean)
+              Statistics: Num rows: 8/8 Data size: 64 Basic stats: COMPLETE 
Column stats: COMPLETE
+              Select Operator
+                expressions: a (type: int)
+                outputColumnNames: _col1
+                Statistics: Num rows: 8/8 Data size: 64 Basic stats: COMPLETE 
Column stats: COMPLETE
+                Group By Operator
+                  aggregations: sum(_col1)
+                  keys: 2 (type: int)
+                  mode: hash
+                  outputColumnNames: _col0, _col1
+                  Statistics: Num rows: 1/1 Data size: 12 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Reduce Output Operator
+                    key expressions: _col0 (type: int)
+                    sort order: +
+                    Map-reduce partition columns: _col0 (type: int)
+                    Statistics: Num rows: 1/1 Data size: 12 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    value expressions: _col1 (type: bigint)
+      Execution mode: vectorized
+      Reduce Operator Tree:
+        Group By Operator
+          aggregations: sum(VALUE._col0)
+          keys: KEY._col0 (type: int)
+          mode: mergepartial
+          outputColumnNames: _col0, _col1
+          Statistics: Num rows: 1/1 Data size: 12 Basic stats: COMPLETE Column 
stats: COMPLETE
+          Select Operator
+            expressions: _col1 (type: bigint)
+            outputColumnNames: _col0
+            Statistics: Num rows: 1/1 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
+            File Output Operator
+              compressed: false
+              Statistics: Num rows: 1/1 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
+              table:
+                  input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                  output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+Warning: Shuffle Join JOIN[8][tables = [$hdt$_0, $hdt$_1]] in Stage 
'Stage-1:MAPRED' is a cross product
+PREHOOK: query: select count(*) from t8 ta, t8 tb where ta.a = tb.b and ta.a=3
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t8
+#### A masked pattern was here ####
+POSTHOOK: query: select count(*) from t8 ta, t8 tb where ta.a = tb.b and ta.a=3
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t8
+#### A masked pattern was here ####
+Warning: Shuffle Join JOIN[8][tables = [$hdt$_0, $hdt$_1]] in Stage 
'Stage-1:MAPRED' is a cross product
+PREHOOK: query: explain analyze select count(*) from t8 ta, t8 tb where ta.a = 
tb.b and ta.a=3
+PREHOOK: type: QUERY
+POSTHOOK: query: explain analyze select count(*) from t8 ta, t8 tb where ta.a 
= tb.b and ta.a=3
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-2 depends on stages: Stage-1
+  Stage-0 depends on stages: Stage-2
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: ta
+            Statistics: Num rows: 40/40 Data size: 160 Basic stats: COMPLETE 
Column stats: COMPLETE
+            Filter Operator
+              predicate: (a = 3) (type: boolean)
+              Statistics: Num rows: 8/8 Data size: 32 Basic stats: COMPLETE 
Column stats: COMPLETE
+              Select Operator
+                Statistics: Num rows: 8/8 Data size: 32 Basic stats: COMPLETE 
Column stats: COMPLETE
+                Reduce Output Operator
+                  sort order: 
+                  Statistics: Num rows: 8/8 Data size: 32 Basic stats: 
COMPLETE Column stats: COMPLETE
+          TableScan
+            alias: tb
+            Statistics: Num rows: 40/40 Data size: 160 Basic stats: COMPLETE 
Column stats: COMPLETE
+            Filter Operator
+              predicate: (b = 3) (type: boolean)
+              Statistics: Num rows: 8/8 Data size: 32 Basic stats: COMPLETE 
Column stats: COMPLETE
+              Select Operator
+                Statistics: Num rows: 8/8 Data size: 32 Basic stats: COMPLETE 
Column stats: COMPLETE
+                Reduce Output Operator
+                  sort order: 
+                  Statistics: Num rows: 8/8 Data size: 32 Basic stats: 
COMPLETE Column stats: COMPLETE
+      Reduce Operator Tree:
+        Join Operator
+          condition map:
+               Inner Join 0 to 1
+          keys:
+            0 
+            1 
+          Statistics: Num rows: 64/64 Data size: 512 Basic stats: COMPLETE 
Column stats: COMPLETE
+          Group By Operator
+            aggregations: count()
+            mode: hash
+            outputColumnNames: _col0
+            Statistics: Num rows: 1/1 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
+            File Output Operator
+              compressed: false
+              table:
+                  input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                  output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                  serde: 
org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
+
+  Stage: Stage-2
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            Reduce Output Operator
+              sort order: 
+              Statistics: Num rows: 1/1 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
+              value expressions: _col0 (type: bigint)
+      Execution mode: vectorized
+      Reduce Operator Tree:
+        Group By Operator
+          aggregations: count(VALUE._col0)
+          mode: mergepartial
+          outputColumnNames: _col0
+          Statistics: Num rows: 1/1 Data size: 8 Basic stats: COMPLETE Column 
stats: COMPLETE
+          File Output Operator
+            compressed: false
+            Statistics: Num rows: 1/1 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
+            table:
+                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: select sum(a) from t8 where b in 
(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50)
 and b=2 and b=2 and 2=b group by b
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t8
+#### A masked pattern was here ####
+POSTHOOK: query: select sum(a) from t8 where b in 
(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50)
 and b=2 and b=2 and 2=b group by b
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t8
+#### A masked pattern was here ####
+PREHOOK: query: explain analyze select sum(a) from t8 where b in 
(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50)
 and b=2 and b=2 and 2=b group by b
+PREHOOK: type: QUERY
+POSTHOOK: query: explain analyze select sum(a) from t8 where b in 
(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50)
 and b=2 and b=2 and 2=b group by b
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: t8
+            Statistics: Num rows: 40/40 Data size: 320 Basic stats: COMPLETE 
Column stats: COMPLETE
+            Filter Operator
+              predicate: ((b = 2) and (b) IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 
31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 
50)) (type: boolean)
+              Statistics: Num rows: 8/8 Data size: 64 Basic stats: COMPLETE 
Column stats: COMPLETE
+              Select Operator
+                expressions: a (type: int)
+                outputColumnNames: _col1
+                Statistics: Num rows: 8/8 Data size: 64 Basic stats: COMPLETE 
Column stats: COMPLETE
+                Group By Operator
+                  aggregations: sum(_col1)
+                  keys: 2 (type: int)
+                  mode: hash
+                  outputColumnNames: _col0, _col1
+                  Statistics: Num rows: 1/1 Data size: 12 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Reduce Output Operator
+                    key expressions: _col0 (type: int)
+                    sort order: +
+                    Map-reduce partition columns: _col0 (type: int)
+                    Statistics: Num rows: 1/1 Data size: 12 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    value expressions: _col1 (type: bigint)
+      Execution mode: vectorized
+      Reduce Operator Tree:
+        Group By Operator
+          aggregations: sum(VALUE._col0)
+          keys: KEY._col0 (type: int)
+          mode: mergepartial
+          outputColumnNames: _col0, _col1
+          Statistics: Num rows: 1/1 Data size: 12 Basic stats: COMPLETE Column 
stats: COMPLETE
+          Select Operator
+            expressions: _col1 (type: bigint)
+            outputColumnNames: _col0
+            Statistics: Num rows: 1/1 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
+            File Output Operator
+              compressed: false
+              Statistics: Num rows: 1/1 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
+              table:
+                  input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                  output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: select sum(a) from t8 where b=2 and (b = 1 or b=2) group by b
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t8
+#### A masked pattern was here ####
+POSTHOOK: query: select sum(a) from t8 where b=2 and (b = 1 or b=2) group by b
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t8
+#### A masked pattern was here ####
+PREHOOK: query: explain analyze select sum(a) from t8 where b=2 and (b = 1 or 
b=2) group by b
+PREHOOK: type: QUERY
+POSTHOOK: query: explain analyze select sum(a) from t8 where b=2 and (b = 1 or 
b=2) group by b
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: t8
+            Statistics: Num rows: 40/40 Data size: 320 Basic stats: COMPLETE 
Column stats: COMPLETE
+            Filter Operator
+              predicate: (((b = 1) or (b = 2)) and (b = 2)) (type: boolean)
+              Statistics: Num rows: 8/8 Data size: 64 Basic stats: COMPLETE 
Column stats: COMPLETE
+              Select Operator
+                expressions: a (type: int)
+                outputColumnNames: _col1
+                Statistics: Num rows: 8/8 Data size: 64 Basic stats: COMPLETE 
Column stats: COMPLETE
+                Group By Operator
+                  aggregations: sum(_col1)
+                  keys: 2 (type: int)
+                  mode: hash
+                  outputColumnNames: _col0, _col1
+                  Statistics: Num rows: 1/1 Data size: 12 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Reduce Output Operator
+                    key expressions: _col0 (type: int)
+                    sort order: +
+                    Map-reduce partition columns: _col0 (type: int)
+                    Statistics: Num rows: 1/1 Data size: 12 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    value expressions: _col1 (type: bigint)
+      Execution mode: vectorized
+      Reduce Operator Tree:
+        Group By Operator
+          aggregations: sum(VALUE._col0)
+          keys: KEY._col0 (type: int)
+          mode: mergepartial
+          outputColumnNames: _col0, _col1
+          Statistics: Num rows: 1/1 Data size: 12 Basic stats: COMPLETE Column 
stats: COMPLETE
+          Select Operator
+            expressions: _col1 (type: bigint)
+            outputColumnNames: _col0
+            Statistics: Num rows: 1/1 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
+            File Output Operator
+              compressed: false
+              Statistics: Num rows: 1/1 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
+              table:
+                  input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                  output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: select sum(a) from t8 where b=2 and (b = 1 or b=2) and (b=1 or 
b=3) group by b
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t8
+#### A masked pattern was here ####
+POSTHOOK: query: select sum(a) from t8 where b=2 and (b = 1 or b=2) and (b=1 
or b=3) group by b
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t8
+#### A masked pattern was here ####
+PREHOOK: query: explain analyze select sum(a) from t8 where b=2 and (b = 1 or 
b=2) and (b=1 or b=3) group by b
+PREHOOK: type: QUERY
+POSTHOOK: query: explain analyze select sum(a) from t8 where b=2 and (b = 1 or 
b=2) and (b=1 or b=3) group by b
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: t8
+            Statistics: Num rows: 40/40 Data size: 320 Basic stats: COMPLETE 
Column stats: COMPLETE
+            Filter Operator
+              predicate: (((b = 1) or (b = 2)) and ((b = 1) or (b = 3)) and (b 
= 2)) (type: boolean)
+              Statistics: Num rows: 8/0 Data size: 64 Basic stats: COMPLETE 
Column stats: COMPLETE
+              Select Operator
+                expressions: a (type: int)
+                outputColumnNames: _col1
+                Statistics: Num rows: 8/0 Data size: 64 Basic stats: COMPLETE 
Column stats: COMPLETE
+                Group By Operator
+                  aggregations: sum(_col1)
+                  keys: 2 (type: int)
+                  mode: hash
+                  outputColumnNames: _col0, _col1
+                  Statistics: Num rows: 1/0 Data size: 12 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Reduce Output Operator
+                    key expressions: _col0 (type: int)
+                    sort order: +
+                    Map-reduce partition columns: _col0 (type: int)
+                    Statistics: Num rows: 1/0 Data size: 12 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    value expressions: _col1 (type: bigint)
+      Execution mode: vectorized
+      Reduce Operator Tree:
+        Group By Operator
+          aggregations: sum(VALUE._col0)
+          keys: KEY._col0 (type: int)
+          mode: mergepartial
+          outputColumnNames: _col0, _col1
+          Statistics: Num rows: 1/0 Data size: 12 Basic stats: COMPLETE Column 
stats: COMPLETE
+          Select Operator
+            expressions: _col1 (type: bigint)
+            outputColumnNames: _col0
+            Statistics: Num rows: 1/0 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
+            File Output Operator
+              compressed: false
+              Statistics: Num rows: 1/0 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
+              table:
+                  input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                  output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: select sum(a) from t8 where
+       b=2 and (b = 1 or b=2)
+and
+       a=3 and (a = 3 or a=4)
+group by b
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t8
+#### A masked pattern was here ####
+POSTHOOK: query: select sum(a) from t8 where
+       b=2 and (b = 1 or b=2)
+and
+       a=3 and (a = 3 or a=4)
+group by b
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t8
+#### A masked pattern was here ####
+PREHOOK: query: explain analyze select sum(a) from t8 where
+       b=2 and (b = 1 or b=2)
+and
+       a=3 and (a = 3 or a=4)
+group by b
+PREHOOK: type: QUERY
+POSTHOOK: query: explain analyze select sum(a) from t8 where
+       b=2 and (b = 1 or b=2)
+and
+       a=3 and (a = 3 or a=4)
+group by b
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: t8
+            Statistics: Num rows: 40/40 Data size: 320 Basic stats: COMPLETE 
Column stats: COMPLETE
+            Filter Operator
+              predicate: (((a = 3) or (a = 4)) and ((b = 1) or (b = 2)) and (a 
= 3) and (b = 2)) (type: boolean)
+              Statistics: Num rows: 8/0 Data size: 64 Basic stats: COMPLETE 
Column stats: COMPLETE
+              Select Operator
+                Statistics: Num rows: 8/0 Data size: 64 Basic stats: COMPLETE 
Column stats: COMPLETE
+                Group By Operator
+                  aggregations: sum(3)
+                  keys: 2 (type: int)
+                  mode: hash
+                  outputColumnNames: _col0, _col1
+                  Statistics: Num rows: 1/0 Data size: 12 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Reduce Output Operator
+                    key expressions: _col0 (type: int)
+                    sort order: +
+                    Map-reduce partition columns: _col0 (type: int)
+                    Statistics: Num rows: 1/0 Data size: 12 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    value expressions: _col1 (type: bigint)
+      Execution mode: vectorized
+      Reduce Operator Tree:
+        Group By Operator
+          aggregations: sum(VALUE._col0)
+          keys: KEY._col0 (type: int)
+          mode: mergepartial
+          outputColumnNames: _col0, _col1
+          Statistics: Num rows: 1/0 Data size: 12 Basic stats: COMPLETE Column 
stats: COMPLETE
+          Select Operator
+            expressions: _col1 (type: bigint)
+            outputColumnNames: _col0
+            Statistics: Num rows: 1/0 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
+            File Output Operator
+              compressed: false
+              Statistics: Num rows: 1/0 Data size: 8 Basic stats: COMPLETE 
Column stats: COMPLETE
+              table:
+                  input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
+                  output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+

Reply via email to