http://git-wip-us.apache.org/repos/asf/hive/blob/5f01dc42/ql/src/test/results/clientpositive/llap/count.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/count.q.out 
b/ql/src/test/results/clientpositive/llap/count.q.out
index e8d5a8a..5c38049 100644
--- a/ql/src/test/results/clientpositive/llap/count.q.out
+++ b/ql/src/test/results/clientpositive/llap/count.q.out
@@ -42,6 +42,7 @@ STAGE DEPENDENCIES:
 STAGE PLANS:
   Stage: Stage-1
     Tez
+#### A masked pattern was here ####
       Edges:
         Reducer 2 <- Map 1 (SIMPLE_EDGE)
 #### A masked pattern was here ####
@@ -68,8 +69,9 @@ STAGE PLANS:
                         Statistics: Num rows: 4 Data size: 78 Basic stats: 
COMPLETE Column stats: NONE
                         value expressions: _col5 (type: bigint)
             Execution mode: llap
+            LLAP IO: no inputs
         Reducer 2 
-            Execution mode: uber
+            Execution mode: llap
             Reduce Operator Tree:
               Group By Operator
                 aggregations: count(DISTINCT KEY._col1:0._col0), 
count(DISTINCT KEY._col1:1._col0), sum(VALUE._col2)
@@ -81,8 +83,8 @@ STAGE PLANS:
                   compressed: false
                   Statistics: Num rows: 2 Data size: 39 Basic stats: COMPLETE 
Column stats: NONE
                   table:
-                      input format: org.apache.hadoop.mapred.TextInputFormat
-                      output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      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
@@ -114,6 +116,7 @@ STAGE DEPENDENCIES:
 STAGE PLANS:
   Stage: Stage-1
     Tez
+#### A masked pattern was here ####
       Edges:
         Reducer 2 <- Map 1 (SIMPLE_EDGE)
 #### A masked pattern was here ####
@@ -139,8 +142,9 @@ STAGE PLANS:
                         Statistics: Num rows: 4 Data size: 78 Basic stats: 
COMPLETE Column stats: NONE
                         value expressions: _col4 (type: bigint), _col5 (type: 
bigint), _col6 (type: bigint), _col7 (type: bigint), _col8 (type: bigint), 
_col9 (type: bigint)
             Execution mode: llap
+            LLAP IO: no inputs
         Reducer 2 
-            Execution mode: uber
+            Execution mode: llap
             Reduce Operator Tree:
               Group By Operator
                 aggregations: count(VALUE._col0), count(VALUE._col1), 
count(VALUE._col2), count(VALUE._col3), count(VALUE._col4), count(VALUE._col5), 
count(DISTINCT KEY._col0:0._col0), count(DISTINCT KEY._col0:1._col0), 
count(DISTINCT KEY._col0:2._col0), count(DISTINCT KEY._col0:3._col0), 
count(DISTINCT KEY._col0:4._col0, KEY._col0:4._col1), count(DISTINCT 
KEY._col0:5._col0, KEY._col0:5._col1), count(DISTINCT KEY._col0:6._col0, 
KEY._col0:6._col1), count(DISTINCT KEY._col0:7._col0, KEY._col0:7._col1), 
count(DISTINCT KEY._col0:8._col0, KEY._col0:8._col1), count(DISTINCT 
KEY._col0:9._col0, KEY._col0:9._col1), count(DISTINCT KEY._col0:10._col0, 
KEY._col0:10._col1, KEY._col0:10._col2), count(DISTINCT KEY._col0:11._col0, 
KEY._col0:11._col1, KEY._col0:11._col2), count(DISTINCT KEY._col0:12._col0, 
KEY._col0:12._col1, KEY._col0:12._col2), count(DISTINCT KEY._col0:13._col0, 
KEY._col0:13._col1, KEY._col0:13._col2), count(DISTINCT KEY._col0:14._col0, 
KEY._col0:14._col1, KEY._col0:14._col2, KEY.
 _col0:14._col3)
@@ -151,8 +155,8 @@ STAGE PLANS:
                   compressed: false
                   Statistics: Num rows: 1 Data size: 200 Basic stats: COMPLETE 
Column stats: NONE
                   table:
-                      input format: org.apache.hadoop.mapred.TextInputFormat
-                      output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      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
@@ -181,6 +185,7 @@ STAGE DEPENDENCIES:
 STAGE PLANS:
   Stage: Stage-1
     Tez
+#### A masked pattern was here ####
       Edges:
         Reducer 2 <- Map 1 (SIMPLE_EDGE)
 #### A masked pattern was here ####
@@ -201,8 +206,9 @@ STAGE PLANS:
                       Statistics: Num rows: 4 Data size: 78 Basic stats: 
COMPLETE Column stats: NONE
                       value expressions: d (type: int)
             Execution mode: llap
+            LLAP IO: no inputs
         Reducer 2 
-            Execution mode: uber
+            Execution mode: llap
             Reduce Operator Tree:
               Group By Operator
                 aggregations: count(DISTINCT KEY._col1:0._col0), 
count(DISTINCT KEY._col1:1._col0), sum(VALUE._col0)
@@ -214,8 +220,8 @@ STAGE PLANS:
                   compressed: false
                   Statistics: Num rows: 2 Data size: 39 Basic stats: COMPLETE 
Column stats: NONE
                   table:
-                      input format: org.apache.hadoop.mapred.TextInputFormat
-                      output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      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
@@ -247,6 +253,7 @@ STAGE DEPENDENCIES:
 STAGE PLANS:
   Stage: Stage-1
     Tez
+#### A masked pattern was here ####
       Edges:
         Reducer 2 <- Map 1 (SIMPLE_EDGE)
 #### A masked pattern was here ####
@@ -265,8 +272,9 @@ STAGE PLANS:
                       sort order: ++++
                       Statistics: Num rows: 4 Data size: 78 Basic stats: 
COMPLETE Column stats: NONE
             Execution mode: llap
+            LLAP IO: no inputs
         Reducer 2 
-            Execution mode: uber
+            Execution mode: llap
             Reduce Operator Tree:
               Group By Operator
                 aggregations: count(1), count(), count(KEY._col0:0._col0), 
count(KEY._col0:1._col0), count(KEY._col0:2._col0), count(KEY._col0:3._col0), 
count(DISTINCT KEY._col0:0._col0), count(DISTINCT KEY._col0:1._col0), 
count(DISTINCT KEY._col0:2._col0), count(DISTINCT KEY._col0:3._col0), 
count(DISTINCT KEY._col0:4._col0, KEY._col0:4._col1), count(DISTINCT 
KEY._col0:5._col0, KEY._col0:5._col1), count(DISTINCT KEY._col0:6._col0, 
KEY._col0:6._col1), count(DISTINCT KEY._col0:7._col0, KEY._col0:7._col1), 
count(DISTINCT KEY._col0:8._col0, KEY._col0:8._col1), count(DISTINCT 
KEY._col0:9._col0, KEY._col0:9._col1), count(DISTINCT KEY._col0:10._col0, 
KEY._col0:10._col1, KEY._col0:10._col2), count(DISTINCT KEY._col0:11._col0, 
KEY._col0:11._col1, KEY._col0:11._col2), count(DISTINCT KEY._col0:12._col0, 
KEY._col0:12._col1, KEY._col0:12._col2), count(DISTINCT KEY._col0:13._col0, 
KEY._col0:13._col1, KEY._col0:13._col2), count(DISTINCT KEY._col0:14._col0, 
KEY._col0:14._col1, KEY._col0:14._col2, K
 EY._col0:14._col3)
@@ -277,8 +285,618 @@ STAGE PLANS:
                   compressed: false
                   Statistics: Num rows: 1 Data size: 168 Basic stats: COMPLETE 
Column stats: NONE
                   table:
-                      input format: org.apache.hadoop.mapred.TextInputFormat
-                      output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      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 count(1), count(*), count(a), count(b), count(c), 
count(d), count(distinct a), count(distinct b), count(distinct c), 
count(distinct d), count(distinct a,b), count(distinct b,c), count(distinct 
c,d), count(distinct a,d), count(distinct a,c), count(distinct b,d), 
count(distinct a,b,c), count(distinct b,c,d), count(distinct a,c,d), 
count(distinct a,b,d), count(distinct a,b,c,d) from abcd
+PREHOOK: type: QUERY
+PREHOOK: Input: default@abcd
+#### A masked pattern was here ####
+POSTHOOK: query: select count(1), count(*), count(a), count(b), count(c), 
count(d), count(distinct a), count(distinct b), count(distinct c), 
count(distinct d), count(distinct a,b), count(distinct b,c), count(distinct 
c,d), count(distinct a,d), count(distinct a,c), count(distinct b,d), 
count(distinct a,b,c), count(distinct b,c,d), count(distinct a,c,d), 
count(distinct a,b,d), count(distinct a,b,c,d) from abcd
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@abcd
+#### A masked pattern was here ####
+7      7       6       6       6       7       3       3       6       7       
4       5       6       6       5       6       4       5       5       5       
4
+PREHOOK: query: --first aggregation with literal. gbinfo was generating wrong 
expression
+explain select count(1), count(*), count(a), count(b), count(c), count(d), 
count(distinct a), count(distinct b), count(distinct c), count(distinct d), 
count(distinct a,b), count(distinct b,c), count(distinct c,d), count(distinct 
a,d), count(distinct a,c), count(distinct b,d), count(distinct a,b,c), 
count(distinct b,c,d), count(distinct a,c,d), count(distinct a,b,d), 
count(distinct a,b,c,d) from abcd
+PREHOOK: type: QUERY
+POSTHOOK: query: --first aggregation with literal. gbinfo was generating wrong 
expression
+explain select count(1), count(*), count(a), count(b), count(c), count(d), 
count(distinct a), count(distinct b), count(distinct c), count(distinct d), 
count(distinct a,b), count(distinct b,c), count(distinct c,d), count(distinct 
a,d), count(distinct a,c), count(distinct b,d), count(distinct a,b,c), 
count(distinct b,c,d), count(distinct a,c,d), count(distinct a,b,d), 
count(distinct a,b,c,d) from abcd
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Tez
+#### A masked pattern was here ####
+      Edges:
+        Reducer 2 <- Map 1 (SIMPLE_EDGE)
+#### A masked pattern was here ####
+      Vertices:
+        Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: abcd
+                  Statistics: Num rows: 4 Data size: 78 Basic stats: COMPLETE 
Column stats: NONE
+                  Select Operator
+                    expressions: a (type: int), b (type: int), c (type: int), 
d (type: int)
+                    outputColumnNames: $f1, $f2, $f3, $f4
+                    Statistics: Num rows: 4 Data size: 78 Basic stats: 
COMPLETE Column stats: NONE
+                    Group By Operator
+                      aggregations: count(1), count(), count($f1), count($f2), 
count($f3), count($f4), count(DISTINCT $f1), count(DISTINCT $f2), 
count(DISTINCT $f3), count(DISTINCT $f4), count(DISTINCT $f1, $f2), 
count(DISTINCT $f2, $f3), count(DISTINCT $f3, $f4), count(DISTINCT $f1, $f4), 
count(DISTINCT $f1, $f3), count(DISTINCT $f2, $f4), count(DISTINCT $f1, $f2, 
$f3), count(DISTINCT $f2, $f3, $f4), count(DISTINCT $f1, $f3, $f4), 
count(DISTINCT $f1, $f2, $f4), count(DISTINCT $f1, $f2, $f3, $f4)
+                      keys: $f1 (type: int), $f2 (type: int), $f3 (type: int), 
$f4 (type: int)
+                      mode: hash
+                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, 
_col15, _col16, _col17, _col18, _col19, _col20, _col21, _col22, _col23, _col24
+                      Statistics: Num rows: 4 Data size: 78 Basic stats: 
COMPLETE Column stats: NONE
+                      Reduce Output Operator
+                        key expressions: _col0 (type: int), _col1 (type: int), 
_col2 (type: int), _col3 (type: int)
+                        sort order: ++++
+                        Statistics: Num rows: 4 Data size: 78 Basic stats: 
COMPLETE Column stats: NONE
+                        value expressions: _col4 (type: bigint), _col5 (type: 
bigint), _col6 (type: bigint), _col7 (type: bigint), _col8 (type: bigint), 
_col9 (type: bigint)
+            Execution mode: llap
+            LLAP IO: no inputs
+        Reducer 2 
+            Execution mode: llap
+            Reduce Operator Tree:
+              Group By Operator
+                aggregations: count(VALUE._col0), count(VALUE._col1), 
count(VALUE._col2), count(VALUE._col3), count(VALUE._col4), count(VALUE._col5), 
count(DISTINCT KEY._col0:0._col0), count(DISTINCT KEY._col0:1._col0), 
count(DISTINCT KEY._col0:2._col0), count(DISTINCT KEY._col0:3._col0), 
count(DISTINCT KEY._col0:4._col0, KEY._col0:4._col1), count(DISTINCT 
KEY._col0:5._col0, KEY._col0:5._col1), count(DISTINCT KEY._col0:6._col0, 
KEY._col0:6._col1), count(DISTINCT KEY._col0:7._col0, KEY._col0:7._col1), 
count(DISTINCT KEY._col0:8._col0, KEY._col0:8._col1), count(DISTINCT 
KEY._col0:9._col0, KEY._col0:9._col1), count(DISTINCT KEY._col0:10._col0, 
KEY._col0:10._col1, KEY._col0:10._col2), count(DISTINCT KEY._col0:11._col0, 
KEY._col0:11._col1, KEY._col0:11._col2), count(DISTINCT KEY._col0:12._col0, 
KEY._col0:12._col1, KEY._col0:12._col2), count(DISTINCT KEY._col0:13._col0, 
KEY._col0:13._col1, KEY._col0:13._col2), count(DISTINCT KEY._col0:14._col0, 
KEY._col0:14._col1, KEY._col0:14._col2, KEY.
 _col0:14._col3)
+                mode: mergepartial
+                outputColumnNames: $f0, $f1, $f2, $f3, $f4, $f5, $f6, $f7, 
$f8, $f9, $f10, $f11, $f12, $f13, $f14, $f15, $f16, $f17, $f18, $f19, $f20
+                Statistics: Num rows: 1 Data size: 336 Basic stats: COMPLETE 
Column stats: NONE
+                File Output Operator
+                  compressed: false
+                  Statistics: Num rows: 1 Data size: 336 Basic stats: COMPLETE 
Column stats: NONE
+                  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 count(1), count(*), count(a), count(b), count(c), 
count(d), count(distinct a), count(distinct b), count(distinct c), 
count(distinct d), count(distinct a,b), count(distinct b,c), count(distinct 
c,d), count(distinct a,d), count(distinct a,c), count(distinct b,d), 
count(distinct a,b,c), count(distinct b,c,d), count(distinct a,c,d), 
count(distinct a,b,d), count(distinct a,b,c,d) from abcd
+PREHOOK: type: QUERY
+PREHOOK: Input: default@abcd
+#### A masked pattern was here ####
+POSTHOOK: query: select count(1), count(*), count(a), count(b), count(c), 
count(d), count(distinct a), count(distinct b), count(distinct c), 
count(distinct d), count(distinct a,b), count(distinct b,c), count(distinct 
c,d), count(distinct a,d), count(distinct a,c), count(distinct b,d), 
count(distinct a,b,c), count(distinct b,c,d), count(distinct a,c,d), 
count(distinct a,b,d), count(distinct a,b,c,d) from abcd
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@abcd
+#### A masked pattern was here ####
+7      7       6       6       6       7       3       3       6       7       
4       5       6       6       5       6       4       5       5       5       
4
+PREHOOK: query: explain select count(distinct b) from abcd group by a
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(distinct b) from abcd group by a
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Tez
+#### A masked pattern was here ####
+      Edges:
+        Reducer 2 <- Map 1 (SIMPLE_EDGE)
+        Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
+#### A masked pattern was here ####
+      Vertices:
+        Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: abcd
+                  Statistics: Num rows: 9 Data size: 78 Basic stats: COMPLETE 
Column stats: NONE
+                  Select Operator
+                    expressions: a (type: int), b (type: int)
+                    outputColumnNames: a, b
+                    Statistics: Num rows: 9 Data size: 78 Basic stats: 
COMPLETE Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: a (type: int), b (type: int)
+                      sort order: ++
+                      Map-reduce partition columns: a (type: int), b (type: 
int)
+                      Statistics: Num rows: 9 Data size: 78 Basic stats: 
COMPLETE Column stats: NONE
+            Execution mode: llap
+            LLAP IO: no inputs
+        Reducer 2 
+            Execution mode: llap
+            Reduce Operator Tree:
+              Group By Operator
+                keys: KEY._col0 (type: int), KEY._col1 (type: int)
+                mode: complete
+                outputColumnNames: a, b
+                Statistics: Num rows: 4 Data size: 34 Basic stats: COMPLETE 
Column stats: NONE
+                Reduce Output Operator
+                  key expressions: a (type: int)
+                  sort order: +
+                  Map-reduce partition columns: a (type: int)
+                  Statistics: Num rows: 4 Data size: 34 Basic stats: COMPLETE 
Column stats: NONE
+                  value expressions: b (type: int)
+        Reducer 3 
+            Execution mode: llap
+            Reduce Operator Tree:
+              Group By Operator
+                aggregations: count(VALUE._col0)
+                keys: KEY._col0 (type: int)
+                mode: complete
+                outputColumnNames: a, $f1
+                Statistics: Num rows: 2 Data size: 17 Basic stats: COMPLETE 
Column stats: NONE
+                Select Operator
+                  expressions: $f1 (type: bigint)
+                  outputColumnNames: _o__c0
+                  Statistics: Num rows: 2 Data size: 17 Basic stats: COMPLETE 
Column stats: NONE
+                  File Output Operator
+                    compressed: false
+                    Statistics: Num rows: 2 Data size: 17 Basic stats: 
COMPLETE Column stats: NONE
+                    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 count(distinct b) from abcd group by a
+PREHOOK: type: QUERY
+PREHOOK: Input: default@abcd
+#### A masked pattern was here ####
+POSTHOOK: query: select count(distinct b) from abcd group by a
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@abcd
+#### A masked pattern was here ####
+1
+1
+1
+2
+PREHOOK: query: explain select count(distinct b) from abcd group by b
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(distinct b) from abcd 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
+    Tez
+#### A masked pattern was here ####
+      Edges:
+        Reducer 2 <- Map 1 (SIMPLE_EDGE)
+        Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
+#### A masked pattern was here ####
+      Vertices:
+        Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: abcd
+                  Statistics: Num rows: 19 Data size: 78 Basic stats: COMPLETE 
Column stats: NONE
+                  Select Operator
+                    expressions: b (type: int)
+                    outputColumnNames: b
+                    Statistics: Num rows: 19 Data size: 78 Basic stats: 
COMPLETE Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: b (type: int)
+                      sort order: +
+                      Map-reduce partition columns: b (type: int)
+                      Statistics: Num rows: 19 Data size: 78 Basic stats: 
COMPLETE Column stats: NONE
+            Execution mode: llap
+            LLAP IO: no inputs
+        Reducer 2 
+            Execution mode: llap
+            Reduce Operator Tree:
+              Group By Operator
+                keys: KEY._col0 (type: int)
+                mode: complete
+                outputColumnNames: b
+                Statistics: Num rows: 9 Data size: 36 Basic stats: COMPLETE 
Column stats: NONE
+                Reduce Output Operator
+                  key expressions: b (type: int)
+                  sort order: +
+                  Map-reduce partition columns: b (type: int)
+                  Statistics: Num rows: 9 Data size: 36 Basic stats: COMPLETE 
Column stats: NONE
+        Reducer 3 
+            Execution mode: llap
+            Reduce Operator Tree:
+              Group By Operator
+                aggregations: count(KEY._col0)
+                keys: KEY._col0 (type: int)
+                mode: complete
+                outputColumnNames: b, $f1
+                Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE 
Column stats: NONE
+                Select Operator
+                  expressions: $f1 (type: bigint)
+                  outputColumnNames: _o__c0
+                  Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE 
Column stats: NONE
+                  File Output Operator
+                    compressed: false
+                    Statistics: Num rows: 4 Data size: 16 Basic stats: 
COMPLETE Column stats: NONE
+                    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 count(distinct b) from abcd group by b
+PREHOOK: type: QUERY
+PREHOOK: Input: default@abcd
+#### A masked pattern was here ####
+POSTHOOK: query: select count(distinct b) from abcd group by b
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@abcd
+#### A masked pattern was here ####
+0
+1
+1
+1
+PREHOOK: query: explain select count(distinct b) from abcd group by c
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(distinct b) from abcd group by c
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Tez
+#### A masked pattern was here ####
+      Edges:
+        Reducer 2 <- Map 1 (SIMPLE_EDGE)
+        Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
+#### A masked pattern was here ####
+      Vertices:
+        Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: abcd
+                  Statistics: Num rows: 9 Data size: 78 Basic stats: COMPLETE 
Column stats: NONE
+                  Select Operator
+                    expressions: b (type: int), c (type: int)
+                    outputColumnNames: b, c
+                    Statistics: Num rows: 9 Data size: 78 Basic stats: 
COMPLETE Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: b (type: int), c (type: int)
+                      sort order: ++
+                      Map-reduce partition columns: b (type: int), c (type: 
int)
+                      Statistics: Num rows: 9 Data size: 78 Basic stats: 
COMPLETE Column stats: NONE
+            Execution mode: llap
+            LLAP IO: no inputs
+        Reducer 2 
+            Execution mode: llap
+            Reduce Operator Tree:
+              Group By Operator
+                keys: KEY._col0 (type: int), KEY._col1 (type: int)
+                mode: complete
+                outputColumnNames: b, c
+                Statistics: Num rows: 4 Data size: 34 Basic stats: COMPLETE 
Column stats: NONE
+                Reduce Output Operator
+                  key expressions: c (type: int)
+                  sort order: +
+                  Map-reduce partition columns: c (type: int)
+                  Statistics: Num rows: 4 Data size: 34 Basic stats: COMPLETE 
Column stats: NONE
+                  value expressions: b (type: int)
+        Reducer 3 
+            Execution mode: llap
+            Reduce Operator Tree:
+              Group By Operator
+                aggregations: count(VALUE._col0)
+                keys: KEY._col0 (type: int)
+                mode: complete
+                outputColumnNames: c, $f1
+                Statistics: Num rows: 2 Data size: 17 Basic stats: COMPLETE 
Column stats: NONE
+                Select Operator
+                  expressions: $f1 (type: bigint)
+                  outputColumnNames: _o__c0
+                  Statistics: Num rows: 2 Data size: 17 Basic stats: COMPLETE 
Column stats: NONE
+                  File Output Operator
+                    compressed: false
+                    Statistics: Num rows: 2 Data size: 17 Basic stats: 
COMPLETE Column stats: NONE
+                    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 count(distinct b) from abcd group by c
+PREHOOK: type: QUERY
+PREHOOK: Input: default@abcd
+#### A masked pattern was here ####
+POSTHOOK: query: select count(distinct b) from abcd group by c
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@abcd
+#### A masked pattern was here ####
+0
+1
+1
+1
+1
+1
+1
+PREHOOK: query: explain select count(b), count(distinct c) from abcd group by d
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(b), count(distinct c) from abcd group by 
d
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Tez
+#### A masked pattern was here ####
+      Edges:
+        Reducer 2 <- Map 1 (SIMPLE_EDGE)
+#### A masked pattern was here ####
+      Vertices:
+        Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: abcd
+                  Statistics: Num rows: 6 Data size: 78 Basic stats: COMPLETE 
Column stats: NONE
+                  Select Operator
+                    expressions: b (type: int), c (type: int), d (type: int)
+                    outputColumnNames: b, c, d
+                    Statistics: Num rows: 6 Data size: 78 Basic stats: 
COMPLETE Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: d (type: int), c (type: int)
+                      sort order: ++
+                      Map-reduce partition columns: d (type: int)
+                      Statistics: Num rows: 6 Data size: 78 Basic stats: 
COMPLETE Column stats: NONE
+                      value expressions: b (type: int)
+            Execution mode: llap
+            LLAP IO: no inputs
+        Reducer 2 
+            Execution mode: llap
+            Reduce Operator Tree:
+              Group By Operator
+                aggregations: count(VALUE._col0), count(DISTINCT 
KEY._col1:0._col0)
+                keys: KEY._col0 (type: int)
+                mode: complete
+                outputColumnNames: d, $f1, $f2
+                Statistics: Num rows: 3 Data size: 39 Basic stats: COMPLETE 
Column stats: NONE
+                Select Operator
+                  expressions: $f1 (type: bigint), $f2 (type: bigint)
+                  outputColumnNames: _o__c0, _o__c1
+                  Statistics: Num rows: 3 Data size: 39 Basic stats: COMPLETE 
Column stats: NONE
+                  File Output Operator
+                    compressed: false
+                    Statistics: Num rows: 3 Data size: 39 Basic stats: 
COMPLETE Column stats: NONE
+                    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 count(b), count(distinct c) from abcd group by d
+PREHOOK: type: QUERY
+PREHOOK: Input: default@abcd
+#### A masked pattern was here ####
+POSTHOOK: query: select count(b), count(distinct c) from abcd group by d
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@abcd
+#### A masked pattern was here ####
+0      1
+1      0
+1      1
+1      1
+1      1
+1      1
+1      1
+PREHOOK: query: --non distinct aggregate with same column as group by key
+explain select a, count(distinct b), count(distinct c), sum(d), sum(d+d), 
sum(d*3), sum(b), sum(c), sum(a), sum(distinct a), sum(distinct b) from abcd 
group by a
+PREHOOK: type: QUERY
+POSTHOOK: query: --non distinct aggregate with same column as group by key
+explain select a, count(distinct b), count(distinct c), sum(d), sum(d+d), 
sum(d*3), sum(b), sum(c), sum(a), sum(distinct a), sum(distinct b) from abcd 
group by a
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Tez
+#### A masked pattern was here ####
+      Edges:
+        Reducer 2 <- Map 1 (SIMPLE_EDGE)
+#### A masked pattern was here ####
+      Vertices:
+        Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: abcd
+                  Statistics: Num rows: 4 Data size: 78 Basic stats: COMPLETE 
Column stats: NONE
+                  Select Operator
+                    expressions: a (type: int), b (type: int), c (type: int), 
d (type: int), (d + d) (type: int), (d * 3) (type: int)
+                    outputColumnNames: $f0, $f1, $f2, $f3, $f4, $f5
+                    Statistics: Num rows: 4 Data size: 78 Basic stats: 
COMPLETE Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: $f0 (type: int), $f1 (type: int), $f2 
(type: int)
+                      sort order: +++
+                      Map-reduce partition columns: $f0 (type: int)
+                      Statistics: Num rows: 4 Data size: 78 Basic stats: 
COMPLETE Column stats: NONE
+                      value expressions: $f3 (type: int), $f4 (type: int), $f5 
(type: int)
+            Execution mode: llap
+            LLAP IO: no inputs
+        Reducer 2 
+            Execution mode: llap
+            Reduce Operator Tree:
+              Group By Operator
+                aggregations: count(DISTINCT KEY._col1:0._col0), 
count(DISTINCT KEY._col1:1._col0), sum(VALUE._col0), sum(VALUE._col1), 
sum(VALUE._col2), sum(KEY._col1:0._col0), sum(KEY._col1:1._col0), 
sum(KEY._col0), sum(DISTINCT KEY._col1:2._col0), sum(DISTINCT KEY._col1:3._col0)
+                keys: KEY._col0 (type: int)
+                mode: complete
+                outputColumnNames: $f0, $f1, $f2, $f3, $f4, $f5, $f6, $f7, 
$f8, $f9, $f10
+                Statistics: Num rows: 2 Data size: 39 Basic stats: COMPLETE 
Column stats: NONE
+                File Output Operator
+                  compressed: false
+                  Statistics: Num rows: 2 Data size: 39 Basic stats: COMPLETE 
Column stats: NONE
+                  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 a, count(distinct b), count(distinct c), sum(d), 
sum(d+d), sum(d*3), sum(b), sum(c), sum(a), sum(distinct a), sum(distinct b) 
from abcd group by a
+PREHOOK: type: QUERY
+PREHOOK: Input: default@abcd
+#### A masked pattern was here ####
+POSTHOOK: query: select a, count(distinct b), count(distinct c), sum(d), 
sum(d+d), sum(d*3), sum(b), sum(c), sum(a), sum(distinct a), sum(distinct b) 
from abcd group by a
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@abcd
+#### A masked pattern was here ####
+10     2       2       10      20      30      1200    95      30      10      
1100
+100    1       1       3       6       9       100     10      100     100     
100
+12     1       2       9       18      27      100     155     24      12      
100
+NULL   1       1       6       12      18      35      23      NULL    NULL    
35
+PREHOOK: query: --non distinct aggregate with same column as distinct aggregate
+explain select a, count(distinct b), count(distinct c), sum(d), sum(c) from 
abcd group by a
+PREHOOK: type: QUERY
+POSTHOOK: query: --non distinct aggregate with same column as distinct 
aggregate
+explain select a, count(distinct b), count(distinct c), sum(d), sum(c) from 
abcd group by a
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Tez
+#### A masked pattern was here ####
+      Edges:
+        Reducer 2 <- Map 1 (SIMPLE_EDGE)
+#### A masked pattern was here ####
+      Vertices:
+        Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: abcd
+                  Statistics: Num rows: 4 Data size: 78 Basic stats: COMPLETE 
Column stats: NONE
+                  Select Operator
+                    expressions: a (type: int), b (type: int), c (type: int), 
d (type: int)
+                    outputColumnNames: a, b, c, d
+                    Statistics: Num rows: 4 Data size: 78 Basic stats: 
COMPLETE Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: a (type: int), b (type: int), c (type: 
int)
+                      sort order: +++
+                      Map-reduce partition columns: a (type: int)
+                      Statistics: Num rows: 4 Data size: 78 Basic stats: 
COMPLETE Column stats: NONE
+                      value expressions: d (type: int)
+            Execution mode: llap
+            LLAP IO: no inputs
+        Reducer 2 
+            Execution mode: llap
+            Reduce Operator Tree:
+              Group By Operator
+                aggregations: count(DISTINCT KEY._col1:0._col0), 
count(DISTINCT KEY._col1:1._col0), sum(VALUE._col0), sum(KEY._col1:1._col0)
+                keys: KEY._col0 (type: int)
+                mode: complete
+                outputColumnNames: a, $f1, $f2, $f3, $f4
+                Statistics: Num rows: 2 Data size: 39 Basic stats: COMPLETE 
Column stats: NONE
+                File Output Operator
+                  compressed: false
+                  Statistics: Num rows: 2 Data size: 39 Basic stats: COMPLETE 
Column stats: NONE
+                  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 a, count(distinct b), count(distinct c), sum(d), sum(c) 
from abcd group by a
+PREHOOK: type: QUERY
+PREHOOK: Input: default@abcd
+#### A masked pattern was here ####
+POSTHOOK: query: select a, count(distinct b), count(distinct c), sum(d), 
sum(c) from abcd group by a
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@abcd
+#### A masked pattern was here ####
+10     2       2       10      95
+100    1       1       3       10
+12     1       2       9       155
+NULL   1       1       6       23
+PREHOOK: query: --aggregation with literal
+explain select count(1), count(*), count(a), count(b), count(c), count(d), 
count(distinct a), count(distinct b), count(distinct c), count(distinct d), 
count(distinct a,b), count(distinct b,c), count(distinct c,d), count(distinct 
a,d), count(distinct a,c), count(distinct b,d), count(distinct a,b,c), 
count(distinct b,c,d), count(distinct a,c,d), count(distinct a,b,d), 
count(distinct a,b,c,d) from abcd
+PREHOOK: type: QUERY
+POSTHOOK: query: --aggregation with literal
+explain select count(1), count(*), count(a), count(b), count(c), count(d), 
count(distinct a), count(distinct b), count(distinct c), count(distinct d), 
count(distinct a,b), count(distinct b,c), count(distinct c,d), count(distinct 
a,d), count(distinct a,c), count(distinct b,d), count(distinct a,b,c), 
count(distinct b,c,d), count(distinct a,c,d), count(distinct a,b,d), 
count(distinct a,b,c,d) from abcd
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Tez
+#### A masked pattern was here ####
+      Edges:
+        Reducer 2 <- Map 1 (SIMPLE_EDGE)
+#### A masked pattern was here ####
+      Vertices:
+        Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: abcd
+                  Statistics: Num rows: 4 Data size: 78 Basic stats: COMPLETE 
Column stats: NONE
+                  Select Operator
+                    expressions: a (type: int), b (type: int), c (type: int), 
d (type: int)
+                    outputColumnNames: $f1, $f2, $f3, $f4
+                    Statistics: Num rows: 4 Data size: 78 Basic stats: 
COMPLETE Column stats: NONE
+                    Reduce Output Operator
+                      key expressions: $f1 (type: int), $f2 (type: int), $f3 
(type: int), $f4 (type: int)
+                      sort order: ++++
+                      Statistics: Num rows: 4 Data size: 78 Basic stats: 
COMPLETE Column stats: NONE
+            Execution mode: llap
+            LLAP IO: no inputs
+        Reducer 2 
+            Execution mode: llap
+            Reduce Operator Tree:
+              Group By Operator
+                aggregations: count(1), count(), count(KEY._col0:0._col0), 
count(KEY._col0:1._col0), count(KEY._col0:2._col0), count(KEY._col0:3._col0), 
count(DISTINCT KEY._col0:0._col0), count(DISTINCT KEY._col0:1._col0), 
count(DISTINCT KEY._col0:2._col0), count(DISTINCT KEY._col0:3._col0), 
count(DISTINCT KEY._col0:4._col0, KEY._col0:4._col1), count(DISTINCT 
KEY._col0:5._col0, KEY._col0:5._col1), count(DISTINCT KEY._col0:6._col0, 
KEY._col0:6._col1), count(DISTINCT KEY._col0:7._col0, KEY._col0:7._col1), 
count(DISTINCT KEY._col0:8._col0, KEY._col0:8._col1), count(DISTINCT 
KEY._col0:9._col0, KEY._col0:9._col1), count(DISTINCT KEY._col0:10._col0, 
KEY._col0:10._col1, KEY._col0:10._col2), count(DISTINCT KEY._col0:11._col0, 
KEY._col0:11._col1, KEY._col0:11._col2), count(DISTINCT KEY._col0:12._col0, 
KEY._col0:12._col1, KEY._col0:12._col2), count(DISTINCT KEY._col0:13._col0, 
KEY._col0:13._col1, KEY._col0:13._col2), count(DISTINCT KEY._col0:14._col0, 
KEY._col0:14._col1, KEY._col0:14._col2, K
 EY._col0:14._col3)
+                mode: complete
+                outputColumnNames: $f0, $f1, $f2, $f3, $f4, $f5, $f6, $f7, 
$f8, $f9, $f10, $f11, $f12, $f13, $f14, $f15, $f16, $f17, $f18, $f19, $f20
+                Statistics: Num rows: 1 Data size: 168 Basic stats: COMPLETE 
Column stats: NONE
+                File Output Operator
+                  compressed: false
+                  Statistics: Num rows: 1 Data size: 168 Basic stats: COMPLETE 
Column stats: NONE
+                  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

http://git-wip-us.apache.org/repos/asf/hive/blob/5f01dc42/ql/src/test/results/clientpositive/llap/cross_join.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/cross_join.q.out 
b/ql/src/test/results/clientpositive/llap/cross_join.q.out
index 6ff8c2d..8578dbf 100644
--- a/ql/src/test/results/clientpositive/llap/cross_join.q.out
+++ b/ql/src/test/results/clientpositive/llap/cross_join.q.out
@@ -1,4 +1,4 @@
-Warning: Shuffle Join MERGEJOIN[11][tables = [$hdt$_0, $hdt$_1]] in Stage 
'Reducer 2' is a cross product
+Warning: Shuffle Join MERGEJOIN[9][tables = [$hdt$_0, $hdt$_1]] in Stage 
'Reducer 2' is a cross product
 PREHOOK: query: -- current
 explain select src.key from src join src src2
 PREHOOK: type: QUERY
@@ -12,6 +12,7 @@ STAGE DEPENDENCIES:
 STAGE PLANS:
   Stage: Stage-1
     Tez
+#### A masked pattern was here ####
       Edges:
         Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE)
 #### A masked pattern was here ####
@@ -20,20 +21,21 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: src
-                  Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
+                  Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Select Operator
                     expressions: key (type: string)
                     outputColumnNames: _col0
-                    Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
+                    Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Reduce Output Operator
                       sort order: 
-                      Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
+                      Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
                       value expressions: _col0 (type: string)
             Execution mode: llap
+            LLAP IO: no inputs
         Map 3 
             Map Operator Tree:
                 TableScan
-                  alias: src
+                  alias: src2
                   Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Select Operator
                     Statistics: Num rows: 500 Data size: 2000 Basic stats: 
COMPLETE Column stats: COMPLETE
@@ -41,6 +43,7 @@ STAGE PLANS:
                       sort order: 
                       Statistics: Num rows: 500 Data size: 2000 Basic stats: 
COMPLETE Column stats: COMPLETE
             Execution mode: llap
+            LLAP IO: no inputs
         Reducer 2 
             Execution mode: llap
             Reduce Operator Tree:
@@ -51,13 +54,13 @@ STAGE PLANS:
                   0 
                   1 
                 outputColumnNames: _col0
-                Statistics: Num rows: 550 Data size: 5843 Basic stats: 
COMPLETE Column stats: NONE
+                Statistics: Num rows: 250000 Data size: 21750000 Basic stats: 
COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 550 Data size: 5843 Basic stats: 
COMPLETE Column stats: NONE
+                  Statistics: Num rows: 250000 Data size: 21750000 Basic 
stats: COMPLETE Column stats: COMPLETE
                   table:
-                      input format: org.apache.hadoop.mapred.TextInputFormat
-                      output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      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
@@ -66,7 +69,7 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-Warning: Shuffle Join MERGEJOIN[11][tables = [$hdt$_0, $hdt$_1]] in Stage 
'Reducer 2' is a cross product
+Warning: Shuffle Join MERGEJOIN[9][tables = [$hdt$_0, $hdt$_1]] in Stage 
'Reducer 2' is a cross product
 PREHOOK: query: -- ansi cross join
 explain select src.key from src cross join src src2
 PREHOOK: type: QUERY
@@ -80,6 +83,7 @@ STAGE DEPENDENCIES:
 STAGE PLANS:
   Stage: Stage-1
     Tez
+#### A masked pattern was here ####
       Edges:
         Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE)
 #### A masked pattern was here ####
@@ -88,20 +92,21 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: src
-                  Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
+                  Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Select Operator
                     expressions: key (type: string)
                     outputColumnNames: _col0
-                    Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
+                    Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Reduce Output Operator
                       sort order: 
-                      Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
+                      Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
                       value expressions: _col0 (type: string)
             Execution mode: llap
+            LLAP IO: no inputs
         Map 3 
             Map Operator Tree:
                 TableScan
-                  alias: src
+                  alias: src2
                   Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Select Operator
                     Statistics: Num rows: 500 Data size: 2000 Basic stats: 
COMPLETE Column stats: COMPLETE
@@ -109,6 +114,7 @@ STAGE PLANS:
                       sort order: 
                       Statistics: Num rows: 500 Data size: 2000 Basic stats: 
COMPLETE Column stats: COMPLETE
             Execution mode: llap
+            LLAP IO: no inputs
         Reducer 2 
             Execution mode: llap
             Reduce Operator Tree:
@@ -119,13 +125,13 @@ STAGE PLANS:
                   0 
                   1 
                 outputColumnNames: _col0
-                Statistics: Num rows: 550 Data size: 5843 Basic stats: 
COMPLETE Column stats: NONE
+                Statistics: Num rows: 250000 Data size: 21750000 Basic stats: 
COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 550 Data size: 5843 Basic stats: 
COMPLETE Column stats: NONE
+                  Statistics: Num rows: 250000 Data size: 21750000 Basic 
stats: COMPLETE Column stats: COMPLETE
                   table:
-                      input format: org.apache.hadoop.mapred.TextInputFormat
-                      output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      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
@@ -147,6 +153,7 @@ STAGE DEPENDENCIES:
 STAGE PLANS:
   Stage: Stage-1
     Tez
+#### A masked pattern was here ####
       Edges:
         Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE)
 #### A masked pattern was here ####
@@ -155,38 +162,40 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: src
-                  Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
+                  Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
                     predicate: key is not null (type: boolean)
-                    Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
+                    Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: string)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
+                      Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col0 (type: string)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: string)
-                        Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
+                        Statistics: Num rows: 500 Data size: 43500 Basic 
stats: COMPLETE Column stats: COMPLETE
             Execution mode: llap
+            LLAP IO: no inputs
         Map 3 
             Map Operator Tree:
                 TableScan
-                  alias: src
-                  Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: NONE
+                  alias: src2
+                  Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
                     predicate: key is not null (type: boolean)
-                    Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
+                    Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: string)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
+                      Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col0 (type: string)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: string)
-                        Statistics: Num rows: 250 Data size: 2656 Basic stats: 
COMPLETE Column stats: NONE
+                        Statistics: Num rows: 500 Data size: 43500 Basic 
stats: COMPLETE Column stats: COMPLETE
             Execution mode: llap
+            LLAP IO: no inputs
         Reducer 2 
             Execution mode: llap
             Reduce Operator Tree:
@@ -197,13 +206,13 @@ STAGE PLANS:
                   0 _col0 (type: string)
                   1 _col0 (type: string)
                 outputColumnNames: _col0
-                Statistics: Num rows: 275 Data size: 2921 Basic stats: 
COMPLETE Column stats: NONE
+                Statistics: Num rows: 1219 Data size: 106053 Basic stats: 
COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 275 Data size: 2921 Basic stats: 
COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1219 Data size: 106053 Basic stats: 
COMPLETE Column stats: COMPLETE
                   table:
-                      input format: org.apache.hadoop.mapred.TextInputFormat
-                      output format: 
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                      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
@@ -212,3 +221,204 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
+Warning: Map Join MAPJOIN[9][bigTable=?] in task 'Map 1' is a cross product
+PREHOOK: query: explain select src.key from src join src src2
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select src.key from src join src src2
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Tez
+#### A masked pattern was here ####
+      Edges:
+        Map 1 <- Map 2 (BROADCAST_EDGE)
+#### A masked pattern was here ####
+      Vertices:
+        Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: src
+                  Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Select Operator
+                    expressions: key (type: string)
+                    outputColumnNames: _col0
+                    Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    Map Join Operator
+                      condition map:
+                           Inner Join 0 to 1
+                      keys:
+                        0 
+                        1 
+                      outputColumnNames: _col0
+                      input vertices:
+                        1 Map 2
+                      Statistics: Num rows: 250000 Data size: 21750000 Basic 
stats: COMPLETE Column stats: COMPLETE
+                      File Output Operator
+                        compressed: false
+                        Statistics: Num rows: 250000 Data size: 21750000 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
+            Execution mode: llap
+            LLAP IO: no inputs
+        Map 2 
+            Map Operator Tree:
+                TableScan
+                  alias: src2
+                  Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Select Operator
+                    Statistics: Num rows: 500 Data size: 2000 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    Reduce Output Operator
+                      sort order: 
+                      Statistics: Num rows: 500 Data size: 2000 Basic stats: 
COMPLETE Column stats: COMPLETE
+            Execution mode: llap
+            LLAP IO: no inputs
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+Warning: Map Join MAPJOIN[9][bigTable=?] in task 'Map 1' is a cross product
+PREHOOK: query: explain select src.key from src cross join src src2
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select src.key from src cross join src src2
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Tez
+#### A masked pattern was here ####
+      Edges:
+        Map 1 <- Map 2 (BROADCAST_EDGE)
+#### A masked pattern was here ####
+      Vertices:
+        Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: src
+                  Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Select Operator
+                    expressions: key (type: string)
+                    outputColumnNames: _col0
+                    Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    Map Join Operator
+                      condition map:
+                           Inner Join 0 to 1
+                      keys:
+                        0 
+                        1 
+                      outputColumnNames: _col0
+                      input vertices:
+                        1 Map 2
+                      Statistics: Num rows: 250000 Data size: 21750000 Basic 
stats: COMPLETE Column stats: COMPLETE
+                      File Output Operator
+                        compressed: false
+                        Statistics: Num rows: 250000 Data size: 21750000 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
+            Execution mode: llap
+            LLAP IO: no inputs
+        Map 2 
+            Map Operator Tree:
+                TableScan
+                  alias: src2
+                  Statistics: Num rows: 500 Data size: 5312 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Select Operator
+                    Statistics: Num rows: 500 Data size: 2000 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    Reduce Output Operator
+                      sort order: 
+                      Statistics: Num rows: 500 Data size: 2000 Basic stats: 
COMPLETE Column stats: COMPLETE
+            Execution mode: llap
+            LLAP IO: no inputs
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: explain select src.key from src cross join src src2 on 
src.key=src2.key
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select src.key from src cross join src src2 on 
src.key=src2.key
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Tez
+#### A masked pattern was here ####
+      Edges:
+        Map 1 <- Map 2 (BROADCAST_EDGE)
+#### A masked pattern was here ####
+      Vertices:
+        Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: src
+                  Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Filter Operator
+                    predicate: key is not null (type: boolean)
+                    Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    Select Operator
+                      expressions: key (type: string)
+                      outputColumnNames: _col0
+                      Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Map Join Operator
+                        condition map:
+                             Inner Join 0 to 1
+                        keys:
+                          0 _col0 (type: string)
+                          1 _col0 (type: string)
+                        outputColumnNames: _col0
+                        input vertices:
+                          1 Map 2
+                        Statistics: Num rows: 1219 Data size: 106053 Basic 
stats: COMPLETE Column stats: COMPLETE
+                        File Output Operator
+                          compressed: false
+                          Statistics: Num rows: 1219 Data size: 106053 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
+            Execution mode: llap
+            LLAP IO: no inputs
+        Map 2 
+            Map Operator Tree:
+                TableScan
+                  alias: src2
+                  Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
+                  Filter Operator
+                    predicate: key is not null (type: boolean)
+                    Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
+                    Select Operator
+                      expressions: key (type: string)
+                      outputColumnNames: _col0
+                      Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
+                      Reduce Output Operator
+                        key expressions: _col0 (type: string)
+                        sort order: +
+                        Map-reduce partition columns: _col0 (type: string)
+                        Statistics: Num rows: 500 Data size: 43500 Basic 
stats: COMPLETE Column stats: COMPLETE
+            Execution mode: llap
+            LLAP IO: no inputs
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+

Reply via email to