http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_grouping_sets_grouping.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/groupby_grouping_sets_grouping.q.out 
b/ql/src/test/results/clientpositive/groupby_grouping_sets_grouping.q.out
index d5945ea..3b5a097 100644
--- a/ql/src/test/results/clientpositive/groupby_grouping_sets_grouping.q.out
+++ b/ql/src/test/results/clientpositive/groupby_grouping_sets_grouping.q.out
@@ -19,11 +19,15 @@ select key, value, `grouping__id`, grouping(key), 
grouping(value)
 from T1_n64
 group by rollup(key, value)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select key, value, `grouping__id`, grouping(key), grouping(value)
 from T1_n64
 group by rollup(key, value)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -101,11 +105,15 @@ select key, value, `grouping__id`, grouping(key), 
grouping(value)
 from T1_n64
 group by cube(key, value)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select key, value, `grouping__id`, grouping(key), grouping(value)
 from T1_n64
 group by cube(key, value)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -189,12 +197,16 @@ from T1_n64
 group by cube(key, value)
 having grouping(key) = 1
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select key, value
 from T1_n64
 group by cube(key, value)
 having grouping(key) = 1
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -274,6 +286,8 @@ group by cube(key, value)
 having grouping(key) = 1 OR grouping(value) = 1
 order by x desc, case when x = 1 then key end
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select key, value, grouping(key)+grouping(value) as x
 from T1_n64
@@ -281,6 +295,8 @@ group by cube(key, value)
 having grouping(key) = 1 OR grouping(value) = 1
 order by x desc, case when x = 1 then key end
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1
@@ -386,11 +402,15 @@ select key, value, `grouping__id`, grouping(key), 
grouping(value)
 from T1_n64
 group by rollup(key, value)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select key, value, `grouping__id`, grouping(key), grouping(value)
 from T1_n64
 group by rollup(key, value)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -468,11 +488,15 @@ select key, value, `grouping__id`, grouping(key), 
grouping(value)
 from T1_n64
 group by cube(key, value)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select key, value, `grouping__id`, grouping(key), grouping(value)
 from T1_n64
 group by cube(key, value)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -556,12 +580,16 @@ from T1_n64
 group by cube(key, value)
 having grouping(key) = 1
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select key, value
 from T1_n64
 group by cube(key, value)
 having grouping(key) = 1
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -638,6 +666,8 @@ group by cube(key, value)
 having grouping(key) = 1 OR grouping(value) = 1
 order by x desc, case when x = 1 then key end
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select key, value, grouping(key)+grouping(value) as x
 from T1_n64
@@ -645,6 +675,8 @@ group by cube(key, value)
 having grouping(key) = 1 OR grouping(value) = 1
 order by x desc, case when x = 1 then key end
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1
@@ -750,11 +782,15 @@ select key, value, grouping(key), grouping(value)
 from T1_n64
 group by key, value
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select key, value, grouping(key), grouping(value)
 from T1_n64
 group by key, value
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -827,11 +863,15 @@ select key, value, grouping(value)
 from T1_n64
 group by key, value
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select key, value, grouping(value)
 from T1_n64
 group by key, value
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -905,12 +945,16 @@ from T1_n64
 group by key, value
 having grouping(key) = 0
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select key, value
 from T1_n64
 group by key, value
 having grouping(key) = 0
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -981,11 +1025,15 @@ select key, value, `grouping__id`, grouping(key, value)
 from T1_n64
 group by cube(key, value)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select key, value, `grouping__id`, grouping(key, value)
 from T1_n64
 group by cube(key, value)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -1068,11 +1116,15 @@ select key, value, `grouping__id`, grouping(value, key)
 from T1_n64
 group by cube(key, value)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select key, value, `grouping__id`, grouping(value, key)
 from T1_n64
 group by cube(key, value)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -1155,11 +1207,15 @@ select key, value, `grouping__id`, grouping(key, value)
 from T1_n64
 group by rollup(key, value)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select key, value, `grouping__id`, grouping(key, value)
 from T1_n64
 group by rollup(key, value)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -1237,11 +1293,15 @@ select key, value, `grouping__id`, grouping(value, key)
 from T1_n64
 group by rollup(key, value)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select key, value, `grouping__id`, grouping(value, key)
 from T1_n64
 group by rollup(key, value)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n64
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_grouping_sets_limit.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/groupby_grouping_sets_limit.q.out 
b/ql/src/test/results/clientpositive/groupby_grouping_sets_limit.q.out
index 241dfb9..7719284 100644
--- a/ql/src/test/results/clientpositive/groupby_grouping_sets_limit.q.out
+++ b/ql/src/test/results/clientpositive/groupby_grouping_sets_limit.q.out
@@ -17,9 +17,13 @@ POSTHOOK: Output: default@t1_n141
 PREHOOK: query: EXPLAIN
 SELECT a, b, count(*) from T1_n141 group by a, b with cube LIMIT 10
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n141
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT a, b, count(*) from T1_n141 group by a, b with cube LIMIT 10
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n141
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -99,9 +103,13 @@ NULL        NULL    6
 PREHOOK: query: EXPLAIN
 SELECT a, b, count(*) FROM T1_n141 GROUP BY a, b  GROUPING SETS (a, (a, b), b, 
()) LIMIT 10
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n141
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT a, b, count(*) FROM T1_n141 GROUP BY a, b  GROUPING SETS (a, (a, b), b, 
()) LIMIT 10
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n141
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -181,9 +189,13 @@ NULL       NULL    6
 PREHOOK: query: EXPLAIN
 SELECT a, b, count(*) FROM T1_n141 GROUP BY a, b GROUPING SETS (a, (a, b)) 
LIMIT 10
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n141
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT a, b, count(*) FROM T1_n141 GROUP BY a, b GROUPING SETS (a, (a, b)) 
LIMIT 10
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n141
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -263,9 +275,13 @@ POSTHOOK: Input: default@t1_n141
 PREHOOK: query: EXPLAIN
 SELECT a FROM T1_n141 GROUP BY a, b, c GROUPING SETS (a, b, c) LIMIT 10
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n141
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT a FROM T1_n141 GROUP BY a, b, c GROUPING SETS (a, b, c) LIMIT 10
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n141
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -342,9 +358,13 @@ NULL
 PREHOOK: query: EXPLAIN
 SELECT a FROM T1_n141 GROUP BY a GROUPING SETS ((a), (a)) LIMIT 10
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n141
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT a FROM T1_n141 GROUP BY a GROUPING SETS ((a), (a)) LIMIT 10
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n141
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -411,9 +431,13 @@ POSTHOOK: Input: default@t1_n141
 PREHOOK: query: EXPLAIN
 SELECT a + b, count(*) FROM T1_n141 GROUP BY a + b GROUPING SETS (a+b) LIMIT 10
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n141
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT a + b, count(*) FROM T1_n141 GROUP BY a + b GROUPING SETS (a+b) LIMIT 10
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n141
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_grouping_window.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_grouping_window.q.out 
b/ql/src/test/results/clientpositive/groupby_grouping_window.q.out
index 63a9d0c..3357778 100644
--- a/ql/src/test/results/clientpositive/groupby_grouping_window.q.out
+++ b/ql/src/test/results/clientpositive/groupby_grouping_window.q.out
@@ -24,6 +24,8 @@ GROUP BY category
 GROUPING SETS ((), (category))
 HAVING max(comments) > 0
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t_n33
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select category, max(live) live, max(comments) comments, rank() OVER 
(PARTITION BY category ORDER BY comments) rank1
 FROM t_n33
@@ -31,6 +33,8 @@ GROUP BY category
 GROUPING SETS ((), (category))
 HAVING max(comments) > 0
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t_n33
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_join_pushdown.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_join_pushdown.q.out 
b/ql/src/test/results/clientpositive/groupby_join_pushdown.q.out
index e7d958a..bae3774 100644
--- a/ql/src/test/results/clientpositive/groupby_join_pushdown.q.out
+++ b/ql/src/test/results/clientpositive/groupby_join_pushdown.q.out
@@ -3,11 +3,15 @@ SELECT f.key, g.key, count(g.key)
 FROM src f JOIN src g ON(f.key = g.key)
 GROUP BY f.key, g.key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT f.key, g.key, count(g.key)
 FROM src f JOIN src g ON(f.key = g.key)
 GROUP BY f.key, g.key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3
@@ -144,11 +148,15 @@ SELECT f.key, g.key
 FROM src f JOIN src g ON(f.key = g.key)
 GROUP BY f.key, g.key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT f.key, g.key
 FROM src f JOIN src g ON(f.key = g.key)
 GROUP BY f.key, g.key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3
@@ -272,10 +280,14 @@ PREHOOK: query: EXPLAIN
 SELECT DISTINCT f.value, g.value
 FROM src f JOIN src g ON(f.value = g.value)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT DISTINCT f.value, g.value
 FROM src f JOIN src g ON(f.value = g.value)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3
@@ -400,11 +412,15 @@ SELECT f.key, g.key, COUNT(*)
 FROM src f JOIN src g ON(f.key = g.key)
 GROUP BY f.key, g.key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT f.key, g.key, COUNT(*)
 FROM src f JOIN src g ON(f.key = g.key)
 GROUP BY f.key, g.key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3
@@ -541,11 +557,15 @@ SELECT  f.ctinyint, g.ctinyint, SUM(f.cbigint)
 FROM alltypesorc f JOIN alltypesorc g ON(f.cint = g.cint)
 GROUP BY f.ctinyint, g.ctinyint
 PREHOOK: type: QUERY
+PREHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT  f.ctinyint, g.ctinyint, SUM(f.cbigint)              
 FROM alltypesorc f JOIN alltypesorc g ON(f.cint = g.cint)
 GROUP BY f.ctinyint, g.ctinyint
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1
@@ -646,11 +666,15 @@ SELECT  f.cbigint, g.cbigint, MAX(f.cint)
 FROM alltypesorc f JOIN alltypesorc g ON(f.cbigint = g.cbigint)
 GROUP BY f.cbigint, g.cbigint
 PREHOOK: type: QUERY
+PREHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT  f.cbigint, g.cbigint, MAX(f.cint)              
 FROM alltypesorc f JOIN alltypesorc g ON(f.cbigint = g.cbigint)
 GROUP BY f.cbigint, g.cbigint
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3
@@ -783,11 +807,15 @@ SELECT  f.ctinyint, g.ctinyint, MIN(f.ctinyint)
 FROM alltypesorc f JOIN alltypesorc g ON(f.ctinyint = g.ctinyint)
 GROUP BY f.ctinyint, g.ctinyint
 PREHOOK: type: QUERY
+PREHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 SELECT  f.ctinyint, g.ctinyint, MIN(f.ctinyint)              
 FROM alltypesorc f JOIN alltypesorc g ON(f.ctinyint = g.ctinyint)
 GROUP BY f.ctinyint, g.ctinyint
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3
@@ -920,11 +948,15 @@ SELECT   MIN(f.cint)
 FROM alltypesorc f JOIN alltypesorc g ON(f.ctinyint = g.ctinyint)
 GROUP BY f.ctinyint, g.ctinyint
 PREHOOK: type: QUERY
+PREHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 SELECT   MIN(f.cint)     
 FROM alltypesorc f JOIN alltypesorc g ON(f.ctinyint = g.ctinyint)
 GROUP BY f.ctinyint, g.ctinyint
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3
@@ -1057,11 +1089,15 @@ SELECT   count(f.ctinyint)
 FROM alltypesorc f JOIN alltypesorc g ON(f.ctinyint = g.ctinyint)
 GROUP BY f.ctinyint, g.ctinyint
 PREHOOK: type: QUERY
+PREHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 SELECT   count(f.ctinyint)              
 FROM alltypesorc f JOIN alltypesorc g ON(f.ctinyint = g.ctinyint)
 GROUP BY f.ctinyint, g.ctinyint
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3
@@ -1198,11 +1234,15 @@ SELECT   count(f.cint), f.ctinyint
 FROM alltypesorc f JOIN alltypesorc g ON(f.ctinyint = g.ctinyint)
 GROUP BY f.ctinyint, g.ctinyint
 PREHOOK: type: QUERY
+PREHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 SELECT   count(f.cint), f.ctinyint              
 FROM alltypesorc f JOIN alltypesorc g ON(f.ctinyint = g.ctinyint)
 GROUP BY f.ctinyint, g.ctinyint
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3
@@ -1339,11 +1379,15 @@ SELECT   sum(f.cint), f.ctinyint
 FROM alltypesorc f JOIN alltypesorc g ON(f.ctinyint = g.ctinyint)
 GROUP BY f.ctinyint, g.ctinyint
 PREHOOK: type: QUERY
+PREHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 SELECT   sum(f.cint), f.ctinyint            
 FROM alltypesorc f JOIN alltypesorc g ON(f.ctinyint = g.ctinyint)
 GROUP BY f.ctinyint, g.ctinyint
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3
@@ -1484,11 +1528,15 @@ SELECT sum(f.cint), f.ctinyint
 FROM alltypesorc f JOIN alltypesorc g ON(f.ctinyint = g.ctinyint)
 GROUP BY f.ctinyint, g.ctinyint
 PREHOOK: type: QUERY
+PREHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 SELECT sum(f.cint), f.ctinyint            
 FROM alltypesorc f JOIN alltypesorc g ON(f.ctinyint = g.ctinyint)
 GROUP BY f.ctinyint, g.ctinyint
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1
@@ -1594,11 +1642,15 @@ SELECT sum(f.cint), f.ctinyint
 FROM alltypesorc f JOIN alltypesorc g ON(f.ctinyint = g.ctinyint)
 GROUP BY f.ctinyint, g.ctinyint
 PREHOOK: type: QUERY
+PREHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 SELECT sum(f.cint), f.ctinyint            
 FROM alltypesorc f JOIN alltypesorc g ON(f.ctinyint = g.ctinyint)
 GROUP BY f.ctinyint, g.ctinyint
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_map_ppr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_map_ppr.q.out 
b/ql/src/test/results/clientpositive/groupby_map_ppr.q.out
index 8072273..75e06ce 100644
--- a/ql/src/test/results/clientpositive/groupby_map_ppr.q.out
+++ b/ql/src/test/results/clientpositive/groupby_map_ppr.q.out
@@ -13,6 +13,10 @@ SELECT substr(src.key,1,1), count(DISTINCT 
substr(src.value,5)), concat(substr(s
 WHERE src.ds = '2008-04-08'
 GROUP BY substr(src.key,1,1)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@srcpart
+PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
+PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
+PREHOOK: Output: default@dest1_n144
 POSTHOOK: query: EXPLAIN EXTENDED
 FROM srcpart src
 INSERT OVERWRITE TABLE dest1_n144 
@@ -20,6 +24,10 @@ SELECT substr(src.key,1,1), count(DISTINCT 
substr(src.value,5)), concat(substr(s
 WHERE src.ds = '2008-04-08'
 GROUP BY substr(src.key,1,1)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@srcpart
+POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
+POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
+POSTHOOK: Output: default@dest1_n144
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_map_ppr_multi_distinct.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/groupby_map_ppr_multi_distinct.q.out 
b/ql/src/test/results/clientpositive/groupby_map_ppr_multi_distinct.q.out
index 961be5d..ca8a308 100644
--- a/ql/src/test/results/clientpositive/groupby_map_ppr_multi_distinct.q.out
+++ b/ql/src/test/results/clientpositive/groupby_map_ppr_multi_distinct.q.out
@@ -13,6 +13,10 @@ SELECT substr(src.key,1,1), count(DISTINCT 
substr(src.value,5)), concat(substr(s
 WHERE src.ds = '2008-04-08'
 GROUP BY substr(src.key,1,1)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@srcpart
+PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
+PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
+PREHOOK: Output: default@dest1_n174
 POSTHOOK: query: EXPLAIN EXTENDED
 FROM srcpart src
 INSERT OVERWRITE TABLE dest1_n174 
@@ -20,6 +24,10 @@ SELECT substr(src.key,1,1), count(DISTINCT 
substr(src.value,5)), concat(substr(s
 WHERE src.ds = '2008-04-08'
 GROUP BY substr(src.key,1,1)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@srcpart
+POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
+POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
+POSTHOOK: Output: default@dest1_n174
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_multi_insert_common_distinct.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/groupby_multi_insert_common_distinct.q.out 
b/ql/src/test/results/clientpositive/groupby_multi_insert_common_distinct.q.out
index e01aa07..0824752 100644
--- 
a/ql/src/test/results/clientpositive/groupby_multi_insert_common_distinct.q.out
+++ 
b/ql/src/test/results/clientpositive/groupby_multi_insert_common_distinct.q.out
@@ -19,11 +19,17 @@ from src
 insert overwrite table dest1_n99 select key, count(distinct value) group by key
 insert overwrite table dest2_n27 select key+key, count(distinct value) group 
by key+key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@dest1_n99
+PREHOOK: Output: default@dest2_n27
 POSTHOOK: query: explain
 from src
 insert overwrite table dest1_n99 select key, count(distinct value) group by key
 insert overwrite table dest2_n27 select key+key, count(distinct value) group 
by key+key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@dest1_n99
+POSTHOOK: Output: default@dest2_n27
 STAGE DEPENDENCIES:
   Stage-2 is a root stage
   Stage-0 depends on stages: Stage-2

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_multi_single_reducer.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/groupby_multi_single_reducer.q.out 
b/ql/src/test/results/clientpositive/groupby_multi_single_reducer.q.out
index c13665b..2999927 100644
--- a/ql/src/test/results/clientpositive/groupby_multi_single_reducer.q.out
+++ b/ql/src/test/results/clientpositive/groupby_multi_single_reducer.q.out
@@ -44,12 +44,20 @@ INSERT OVERWRITE TABLE dest_g2 SELECT substr(src.key,1,1), 
count(DISTINCT substr
 INSERT OVERWRITE TABLE dest_g3 SELECT substr(src.key,1,1), count(DISTINCT 
substr(src.value,5)), concat(substr(src.key,1,1),sum(substr(src.value,5))), 
sum(DISTINCT substr(src.value, 5)), count(src.value) WHERE substr(src.key,1,1) 
< 5 GROUP BY substr(src.key,1,1)
 INSERT OVERWRITE TABLE dest_g4 SELECT substr(src.key,1,1), count(DISTINCT 
substr(src.value,5)), concat(substr(src.key,1,1),sum(substr(src.value,5))), 
sum(DISTINCT substr(src.value, 5)), count(src.value) GROUP BY 
substr(src.key,1,1)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@dest_g2
+PREHOOK: Output: default@dest_g3
+PREHOOK: Output: default@dest_g4
 POSTHOOK: query: EXPLAIN
 FROM src
 INSERT OVERWRITE TABLE dest_g2 SELECT substr(src.key,1,1), count(DISTINCT 
substr(src.value,5)), concat(substr(src.key,1,1),sum(substr(src.value,5))), 
sum(DISTINCT substr(src.value, 5)), count(src.value) WHERE substr(src.key,1,1) 
>= 5 GROUP BY substr(src.key,1,1)
 INSERT OVERWRITE TABLE dest_g3 SELECT substr(src.key,1,1), count(DISTINCT 
substr(src.value,5)), concat(substr(src.key,1,1),sum(substr(src.value,5))), 
sum(DISTINCT substr(src.value, 5)), count(src.value) WHERE substr(src.key,1,1) 
< 5 GROUP BY substr(src.key,1,1)
 INSERT OVERWRITE TABLE dest_g4 SELECT substr(src.key,1,1), count(DISTINCT 
substr(src.value,5)), concat(substr(src.key,1,1),sum(substr(src.value,5))), 
sum(DISTINCT substr(src.value, 5)), count(src.value) GROUP BY 
substr(src.key,1,1)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@dest_g2
+POSTHOOK: Output: default@dest_g3
+POSTHOOK: Output: default@dest_g4
 STAGE DEPENDENCIES:
   Stage-3 is a root stage
   Stage-2 depends on stages: Stage-3
@@ -268,6 +276,12 @@ INSERT OVERWRITE TABLE dest_g4 SELECT substr(src.key,1,1), 
count(DISTINCT substr
 INSERT OVERWRITE TABLE dest_h2 SELECT substr(src.key,1,1) as c1, 
count(DISTINCT substr(src.value,5)) as c2, 
concat(substr(src.key,1,1),sum(substr(src.value,5))) as c3, 
sum(substr(src.value, 5)) as c4, count(src.value) as c6 GROUP BY 
substr(src.key,1,1), substr(src.key,2,1) ORDER BY c1, c2  LIMIT 10
 INSERT OVERWRITE TABLE dest_h3 SELECT substr(src.key,1,1), count(DISTINCT 
substr(src.value,5)), concat(substr(src.key,1,1),sum(substr(src.value,5))), 
sum(substr(src.value, 5)), count(src.value) WHERE substr(src.key,1,1) >= 5 
GROUP BY substr(src.key,1,1), substr(src.key,2,1)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@dest_g2
+PREHOOK: Output: default@dest_g3
+PREHOOK: Output: default@dest_g4
+PREHOOK: Output: default@dest_h2
+PREHOOK: Output: default@dest_h3
 POSTHOOK: query: EXPLAIN
 FROM src
 INSERT OVERWRITE TABLE dest_g2 SELECT substr(src.key,1,1), count(DISTINCT 
substr(src.value,5)), concat(substr(src.key,1,1),sum(substr(src.value,5))), 
sum(DISTINCT substr(src.value, 5)), count(src.value) WHERE substr(src.key,1,1) 
>= 5 GROUP BY substr(src.key,1,1)
@@ -276,6 +290,12 @@ INSERT OVERWRITE TABLE dest_g4 SELECT substr(src.key,1,1), 
count(DISTINCT substr
 INSERT OVERWRITE TABLE dest_h2 SELECT substr(src.key,1,1) as c1, 
count(DISTINCT substr(src.value,5)) as c2, 
concat(substr(src.key,1,1),sum(substr(src.value,5))) as c3, 
sum(substr(src.value, 5)) as c4, count(src.value) as c6 GROUP BY 
substr(src.key,1,1), substr(src.key,2,1) ORDER BY c1, c2  LIMIT 10
 INSERT OVERWRITE TABLE dest_h3 SELECT substr(src.key,1,1), count(DISTINCT 
substr(src.value,5)), concat(substr(src.key,1,1),sum(substr(src.value,5))), 
sum(substr(src.value, 5)), count(src.value) WHERE substr(src.key,1,1) >= 5 
GROUP BY substr(src.key,1,1), substr(src.key,2,1)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@dest_g2
+POSTHOOK: Output: default@dest_g3
+POSTHOOK: Output: default@dest_g4
+POSTHOOK: Output: default@dest_h2
+POSTHOOK: Output: default@dest_h3
 STAGE DEPENDENCIES:
   Stage-5 is a root stage
   Stage-2 depends on stages: Stage-5

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_multi_single_reducer2.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/groupby_multi_single_reducer2.q.out 
b/ql/src/test/results/clientpositive/groupby_multi_single_reducer2.q.out
index 65540a6..58bd3b6 100644
--- a/ql/src/test/results/clientpositive/groupby_multi_single_reducer2.q.out
+++ b/ql/src/test/results/clientpositive/groupby_multi_single_reducer2.q.out
@@ -19,11 +19,17 @@ FROM src
 INSERT OVERWRITE TABLE dest_g2_n4 SELECT substr(src.key,1,1), count(DISTINCT 
src.key) WHERE substr(src.key,1,1) >= 5 GROUP BY substr(src.key,1,1)
 INSERT OVERWRITE TABLE dest_g3_n0 SELECT substr(src.key,1,1), count(DISTINCT 
src.key), count(src.value) WHERE substr(src.key,1,1) < 5 GROUP BY 
substr(src.key,1,1)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@dest_g2_n4
+PREHOOK: Output: default@dest_g3_n0
 POSTHOOK: query: EXPLAIN
 FROM src
 INSERT OVERWRITE TABLE dest_g2_n4 SELECT substr(src.key,1,1), count(DISTINCT 
src.key) WHERE substr(src.key,1,1) >= 5 GROUP BY substr(src.key,1,1)
 INSERT OVERWRITE TABLE dest_g3_n0 SELECT substr(src.key,1,1), count(DISTINCT 
src.key), count(src.value) WHERE substr(src.key,1,1) < 5 GROUP BY 
substr(src.key,1,1)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@dest_g2_n4
+POSTHOOK: Output: default@dest_g3_n0
 STAGE DEPENDENCIES:
   Stage-2 is a root stage
   Stage-0 depends on stages: Stage-2

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_multi_single_reducer3.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/groupby_multi_single_reducer3.q.out 
b/ql/src/test/results/clientpositive/groupby_multi_single_reducer3.q.out
index aa76313..c1f8479 100644
--- a/ql/src/test/results/clientpositive/groupby_multi_single_reducer3.q.out
+++ b/ql/src/test/results/clientpositive/groupby_multi_single_reducer3.q.out
@@ -25,6 +25,9 @@ select key, count(*)
 where src.value in ('val_400', 'val_500') AND key in (400, 450)
 group by key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@e1_n1
+PREHOOK: Output: default@e2_n2
 POSTHOOK: query: explain
 from src
 insert overwrite table e1_n1
@@ -36,6 +39,9 @@ select key, count(*)
 where src.value in ('val_400', 'val_500') AND key in (400, 450)
 group by key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@e1_n1
+POSTHOOK: Output: default@e2_n2
 STAGE DEPENDENCIES:
   Stage-2 is a root stage
   Stage-0 depends on stages: Stage-2
@@ -279,6 +285,9 @@ select value, count(*)
 where src.key + src.key = 400 or src.key - 100 = 500 AND VALUE IS NOT NULL
 group by value
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@e1_n1
+PREHOOK: Output: default@e2_n2
 POSTHOOK: query: explain
 from src
 insert overwrite table e1_n1
@@ -290,6 +299,9 @@ select value, count(*)
 where src.key + src.key = 400 or src.key - 100 = 500 AND VALUE IS NOT NULL
 group by value
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@e1_n1
+POSTHOOK: Output: default@e2_n2
 STAGE DEPENDENCIES:
   Stage-2 is a root stage
   Stage-0 depends on stages: Stage-2
@@ -534,6 +546,9 @@ select key, count(*)
 where src.value in ('val_400', 'val_500') AND key in (400, 450)
 group by key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@e1_n1
+PREHOOK: Output: default@e2_n2
 POSTHOOK: query: explain
 from src
 insert overwrite table e1_n1
@@ -545,6 +560,9 @@ select key, count(*)
 where src.value in ('val_400', 'val_500') AND key in (400, 450)
 group by key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@e1_n1
+POSTHOOK: Output: default@e2_n2
 STAGE DEPENDENCIES:
   Stage-2 is a root stage
   Stage-0 depends on stages: Stage-2
@@ -788,6 +806,9 @@ select value, count(*)
 where src.key + src.key = 400 or src.key - 100 = 500 AND VALUE IS NOT NULL
 group by value
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@e1_n1
+PREHOOK: Output: default@e2_n2
 POSTHOOK: query: explain
 from src
 insert overwrite table e1_n1
@@ -799,6 +820,9 @@ select value, count(*)
 where src.key + src.key = 400 or src.key - 100 = 500 AND VALUE IS NOT NULL
 group by value
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@e1_n1
+POSTHOOK: Output: default@e2_n2
 STAGE DEPENDENCIES:
   Stage-2 is a root stage
   Stage-0 depends on stages: Stage-2

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_multialias.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_multialias.q.out 
b/ql/src/test/results/clientpositive/groupby_multialias.q.out
index 1b15ef0..66dad28 100644
--- a/ql/src/test/results/clientpositive/groupby_multialias.q.out
+++ b/ql/src/test/results/clientpositive/groupby_multialias.q.out
@@ -11,11 +11,15 @@ select t1_n150.a as a1, min(t1_n150.a) as a
 from t1_n150
 group by t1_n150.a
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n150
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select t1_n150.a as a1, min(t1_n150.a) as a
 from t1_n150
 group by t1_n150.a
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n150
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_position.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_position.q.out 
b/ql/src/test/results/clientpositive/groupby_position.q.out
index 81e6976..13c3b91 100644
--- a/ql/src/test/results/clientpositive/groupby_position.q.out
+++ b/ql/src/test/results/clientpositive/groupby_position.q.out
@@ -19,11 +19,17 @@ FROM SRC
 INSERT OVERWRITE TABLE testTable1 SELECT SRC.key, COUNT(DISTINCT 
SUBSTR(SRC.value,5)) WHERE SRC.key < 20 GROUP BY 1 
 INSERT OVERWRITE TABLE testTable2 SELECT SRC.key, SRC.value, COUNT(DISTINCT 
SUBSTR(SRC.value,5)) WHERE SRC.key < 20 GROUP BY 1, 2
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@testtable1
+PREHOOK: Output: default@testtable2
 POSTHOOK: query: EXPLAIN
 FROM SRC
 INSERT OVERWRITE TABLE testTable1 SELECT SRC.key, COUNT(DISTINCT 
SUBSTR(SRC.value,5)) WHERE SRC.key < 20 GROUP BY 1 
 INSERT OVERWRITE TABLE testTable2 SELECT SRC.key, SRC.value, COUNT(DISTINCT 
SUBSTR(SRC.value,5)) WHERE SRC.key < 20 GROUP BY 1, 2
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@testtable1
+POSTHOOK: Output: default@testtable2
 STAGE DEPENDENCIES:
   Stage-2 is a root stage
   Stage-0 depends on stages: Stage-2
@@ -298,11 +304,17 @@ FROM SRC
 INSERT OVERWRITE TABLE testTable1 SELECT SRC.key, COUNT(DISTINCT 
SUBSTR(SRC.value,5)) WHERE SRC.key < 20 GROUP BY 1
 INSERT OVERWRITE TABLE testTable2 SELECT SRC.key, SRC.value, COUNT(DISTINCT 
SUBSTR(SRC.value,5)) WHERE SRC.key < 20 GROUP BY 2, 1
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@testtable1
+PREHOOK: Output: default@testtable2
 POSTHOOK: query: EXPLAIN
 FROM SRC
 INSERT OVERWRITE TABLE testTable1 SELECT SRC.key, COUNT(DISTINCT 
SUBSTR(SRC.value,5)) WHERE SRC.key < 20 GROUP BY 1
 INSERT OVERWRITE TABLE testTable2 SELECT SRC.key, SRC.value, COUNT(DISTINCT 
SUBSTR(SRC.value,5)) WHERE SRC.key < 20 GROUP BY 2, 1
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@testtable1
+POSTHOOK: Output: default@testtable2
 STAGE DEPENDENCIES:
   Stage-2 is a root stage
   Stage-0 depends on stages: Stage-2
@@ -577,11 +589,15 @@ SELECT t.key, t.value
 FROM (SELECT b.key as key, count(1) as value FROM src b WHERE b.key <= 20 
GROUP BY 1) t
 ORDER BY 2 DESC, 1 ASC
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT t.key, t.value
 FROM (SELECT b.key as key, count(1) as value FROM src b WHERE b.key <= 20 
GROUP BY 1) t
 ORDER BY 2 DESC, 1 ASC
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1
@@ -694,6 +710,8 @@ FROM (
 ) c
 ORDER BY 1 DESC, 2 DESC, 3 ASC, 4 ASC
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT c1, c2, c3, c4
 FROM (
@@ -710,6 +728,8 @@ FROM (
 ) c
 ORDER BY 1 DESC, 2 DESC, 3 ASC, 4 ASC
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-4
@@ -885,9 +905,13 @@ POSTHOOK: Input: default@src
 PREHOOK: query: EXPLAIN
 SELECT key FROM src ORDER BY 1
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT key FROM src ORDER BY 1
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -1438,9 +1462,13 @@ POSTHOOK: Input: default@src
 PREHOOK: query: EXPLAIN
 SELECT distinct key FROM src ORDER BY 1
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT distinct key FROM src ORDER BY 1
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_ppd.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_ppd.q.out 
b/ql/src/test/results/clientpositive/groupby_ppd.q.out
index a2292bd..57a3b34 100644
--- a/ql/src/test/results/clientpositive/groupby_ppd.q.out
+++ b/ql/src/test/results/clientpositive/groupby_ppd.q.out
@@ -8,8 +8,12 @@ POSTHOOK: Output: database:default
 POSTHOOK: Output: default@invites_n0
 PREHOOK: query: explain select * from (select foo, bar from (select bar, foo 
from invites_n0 c union all select bar, foo from invites_n0 d) b) a group by 
bar, foo having bar=1
 PREHOOK: type: QUERY
+PREHOOK: Input: default@invites_n0
+#### A masked pattern was here ####
 POSTHOOK: query: explain select * from (select foo, bar from (select bar, foo 
from invites_n0 c union all select bar, foo from invites_n0 d) b) a group by 
bar, foo having bar=1
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@invites_n0
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_ppr.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_ppr.q.out 
b/ql/src/test/results/clientpositive/groupby_ppr.q.out
index d11aa89..2a16ea9 100644
--- a/ql/src/test/results/clientpositive/groupby_ppr.q.out
+++ b/ql/src/test/results/clientpositive/groupby_ppr.q.out
@@ -13,6 +13,10 @@ SELECT substr(src.key,1,1), count(DISTINCT 
substr(src.value,5)), concat(substr(s
 WHERE src.ds = '2008-04-08'
 GROUP BY substr(src.key,1,1)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@srcpart
+PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
+PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
+PREHOOK: Output: default@dest1_n79
 POSTHOOK: query: EXPLAIN EXTENDED
 FROM srcpart src
 INSERT OVERWRITE TABLE dest1_n79 
@@ -20,6 +24,10 @@ SELECT substr(src.key,1,1), count(DISTINCT 
substr(src.value,5)), concat(substr(s
 WHERE src.ds = '2008-04-08'
 GROUP BY substr(src.key,1,1)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@srcpart
+POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
+POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
+POSTHOOK: Output: default@dest1_n79
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_ppr_multi_distinct.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/groupby_ppr_multi_distinct.q.out 
b/ql/src/test/results/clientpositive/groupby_ppr_multi_distinct.q.out
index a7c209d..959edb8 100644
--- a/ql/src/test/results/clientpositive/groupby_ppr_multi_distinct.q.out
+++ b/ql/src/test/results/clientpositive/groupby_ppr_multi_distinct.q.out
@@ -13,6 +13,10 @@ SELECT substr(src.key,1,1), count(DISTINCT 
substr(src.value,5)), concat(substr(s
 WHERE src.ds = '2008-04-08'
 GROUP BY substr(src.key,1,1)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@srcpart
+PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
+PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
+PREHOOK: Output: default@dest1
 POSTHOOK: query: EXPLAIN EXTENDED
 FROM srcpart src
 INSERT OVERWRITE TABLE dest1 
@@ -20,6 +24,10 @@ SELECT substr(src.key,1,1), count(DISTINCT 
substr(src.value,5)), concat(substr(s
 WHERE src.ds = '2008-04-08'
 GROUP BY substr(src.key,1,1)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@srcpart
+POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
+POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
+POSTHOOK: Output: default@dest1
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -378,6 +386,10 @@ SELECT substr(src.key,1,1), count(DISTINCT 
substr(src.value,5)), concat(substr(s
 WHERE src.ds = '2008-04-08'
 GROUP BY substr(src.key,1,1)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@srcpart
+PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
+PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
+PREHOOK: Output: default@dest1
 POSTHOOK: query: EXPLAIN EXTENDED
 FROM srcpart src
 INSERT OVERWRITE TABLE dest1
@@ -385,6 +397,10 @@ SELECT substr(src.key,1,1), count(DISTINCT 
substr(src.value,5)), concat(substr(s
 WHERE src.ds = '2008-04-08'
 GROUP BY substr(src.key,1,1)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@srcpart
+POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
+POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
+POSTHOOK: Output: default@dest1
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_rollup1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_rollup1.q.out 
b/ql/src/test/results/clientpositive/groupby_rollup1.q.out
index 5f9d2d5..54e312e 100644
--- a/ql/src/test/results/clientpositive/groupby_rollup1.q.out
+++ b/ql/src/test/results/clientpositive/groupby_rollup1.q.out
@@ -17,9 +17,13 @@ POSTHOOK: Output: default@t1_n91
 PREHOOK: query: EXPLAIN
 SELECT key, val, count(1) FROM T1_n91 GROUP BY key, val with rollup
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n91
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT key, val, count(1) FROM T1_n91 GROUP BY key, val with rollup
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n91
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -96,9 +100,13 @@ NULL        NULL    6
 PREHOOK: query: EXPLAIN
 SELECT key, count(distinct val) FROM T1_n91 GROUP BY key with rollup
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n91
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT key, count(distinct val) FROM T1_n91 GROUP BY key with rollup
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n91
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -168,9 +176,13 @@ NULL       6
 PREHOOK: query: EXPLAIN
 SELECT key, val, count(1) FROM T1_n91 GROUP BY key, val with rollup
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n91
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT key, val, count(1) FROM T1_n91 GROUP BY key, val with rollup
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n91
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1
@@ -272,9 +284,13 @@ NULL       NULL    6
 PREHOOK: query: EXPLAIN
 SELECT key, count(distinct val) FROM T1_n91 GROUP BY key with rollup
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n91
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT key, count(distinct val) FROM T1_n91 GROUP BY key with rollup
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n91
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1
@@ -387,11 +403,17 @@ FROM T1_n91
 INSERT OVERWRITE TABLE T2_n56 SELECT key, val, count(1) group by key, val with 
rollup
 INSERT OVERWRITE TABLE T3_n20 SELECT key, val, sum(1) group by rollup(key, val)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n91
+PREHOOK: Output: default@t2_n56
+PREHOOK: Output: default@t3_n20
 POSTHOOK: query: EXPLAIN
 FROM T1_n91
 INSERT OVERWRITE TABLE T2_n56 SELECT key, val, count(1) group by key, val with 
rollup
 INSERT OVERWRITE TABLE T3_n20 SELECT key, val, sum(1) group by rollup(key, val)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n91
+POSTHOOK: Output: default@t2_n56
+POSTHOOK: Output: default@t3_n20
 STAGE DEPENDENCIES:
   Stage-2 is a root stage
   Stage-3 depends on stages: Stage-2

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_rollup_empty.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_rollup_empty.q.out 
b/ql/src/test/results/clientpositive/groupby_rollup_empty.q.out
index be068d1..22be5ed 100644
--- a/ql/src/test/results/clientpositive/groupby_rollup_empty.q.out
+++ b/ql/src/test/results/clientpositive/groupby_rollup_empty.q.out
@@ -141,6 +141,8 @@ from    tx2_n1
 where  a<0
 group by a,b grouping sets ((), b, a)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@tx2_n1
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select  sum(c),
         grouping(b),
@@ -149,6 +151,8 @@ from    tx2_n1
 where  a<0
 group by a,b grouping sets ((), b, a)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@tx2_n1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_sort_10.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_sort_10.q.out 
b/ql/src/test/results/clientpositive/groupby_sort_10.q.out
index f0d91fe..9198418 100644
--- a/ql/src/test/results/clientpositive/groupby_sort_10.q.out
+++ b/ql/src/test/results/clientpositive/groupby_sort_10.q.out
@@ -22,8 +22,14 @@ POSTHOOK: Lineage: t1_n149 PARTITION(ds=1).key SIMPLE 
[(src)src.FieldSchema(name
 POSTHOOK: Lineage: t1_n149 PARTITION(ds=1).val SIMPLE 
[(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: EXPLAIN select distinct key from T1_n149
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n149
+PREHOOK: Input: default@t1_n149@ds=1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN select distinct key from T1_n149
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n149
+POSTHOOK: Input: default@t1_n149@ds=1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -85,8 +91,16 @@ POSTHOOK: Lineage: t1_n149 PARTITION(ds=2).key SIMPLE 
[(src)src.FieldSchema(name
 POSTHOOK: Lineage: t1_n149 PARTITION(ds=2).val SIMPLE 
[(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: EXPLAIN select distinct key from T1_n149
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n149
+PREHOOK: Input: default@t1_n149@ds=1
+PREHOOK: Input: default@t1_n149@ds=2
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN select distinct key from T1_n149
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n149
+POSTHOOK: Input: default@t1_n149@ds=1
+POSTHOOK: Input: default@t1_n149@ds=2
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_sort_11.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_sort_11.q.out 
b/ql/src/test/results/clientpositive/groupby_sort_11.q.out
index e5931bd..351b730 100644
--- a/ql/src/test/results/clientpositive/groupby_sort_11.q.out
+++ b/ql/src/test/results/clientpositive/groupby_sort_11.q.out
@@ -22,8 +22,14 @@ POSTHOOK: Lineage: t1_n18 PARTITION(ds=1).key SIMPLE 
[(src)src.FieldSchema(name:
 POSTHOOK: Lineage: t1_n18 PARTITION(ds=1).val SIMPLE 
[(src)src.FieldSchema(name:value, type:string, comment:default), ]
 PREHOOK: query: EXPLAIN select count(distinct key) from T1_n18
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n18
+PREHOOK: Input: default@t1_n18@ds=1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN select count(distinct key) from T1_n18
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n18
+POSTHOOK: Input: default@t1_n18@ds=1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -84,8 +90,14 @@ POSTHOOK: Input: default@t1_n18@ds=1
 6
 PREHOOK: query: EXPLAIN select count(distinct key), count(1), count(key), 
sum(distinct key) from T1_n18
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n18
+PREHOOK: Input: default@t1_n18@ds=1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN select count(distinct key), count(1), count(key), 
sum(distinct key) from T1_n18
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n18
+POSTHOOK: Input: default@t1_n18@ds=1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -146,8 +158,14 @@ POSTHOOK: Input: default@t1_n18@ds=1
 6      10      10      28.0
 PREHOOK: query: EXPLAIN select count(distinct key), count(1), count(key), 
sum(distinct key) from T1_n18 group by key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n18
+PREHOOK: Input: default@t1_n18@ds=1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN select count(distinct key), count(1), count(key), 
sum(distinct key) from T1_n18 group by key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n18
+POSTHOOK: Input: default@t1_n18@ds=1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -219,8 +237,14 @@ POSTHOOK: Input: default@t1_n18@ds=1
 1      3       3       5.0
 PREHOOK: query: EXPLAIN select key, count(distinct key), count(1), count(key), 
sum(distinct key) from T1_n18 group by key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n18
+PREHOOK: Input: default@t1_n18@ds=1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN select key, count(distinct key), count(1), 
count(key), sum(distinct key) from T1_n18 group by key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n18
+POSTHOOK: Input: default@t1_n18@ds=1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -288,8 +312,14 @@ POSTHOOK: Input: default@t1_n18@ds=1
 9      1       1       1       9.0
 PREHOOK: query: EXPLAIN select count(distinct key+key) from T1_n18
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n18
+PREHOOK: Input: default@t1_n18@ds=1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN select count(distinct key+key) from T1_n18
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n18
+POSTHOOK: Input: default@t1_n18@ds=1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1
@@ -375,8 +405,14 @@ POSTHOOK: Input: default@t1_n18@ds=1
 6
 PREHOOK: query: EXPLAIN select count(distinct 1) from T1_n18
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n18
+PREHOOK: Input: default@t1_n18@ds=1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN select count(distinct 1) from T1_n18
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n18
+POSTHOOK: Input: default@t1_n18@ds=1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -433,8 +469,14 @@ POSTHOOK: Input: default@t1_n18@ds=1
 1
 PREHOOK: query: EXPLAIN select count(distinct key) from T1_n18
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n18
+PREHOOK: Input: default@t1_n18@ds=1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN select count(distinct key) from T1_n18
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n18
+POSTHOOK: Input: default@t1_n18@ds=1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_sort_1_23.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_sort_1_23.q.out 
b/ql/src/test/results/clientpositive/groupby_sort_1_23.q.out
index d8fb255..e4d86fe 100644
--- a/ql/src/test/results/clientpositive/groupby_sort_1_23.q.out
+++ b/ql/src/test/results/clientpositive/groupby_sort_1_23.q.out
@@ -38,10 +38,14 @@ PREHOOK: query: EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE outputTbl1_n18
 SELECT key, count(1) FROM T1_n80 GROUP BY key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n80
+PREHOOK: Output: default@outputtbl1_n18
 POSTHOOK: query: EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE outputTbl1_n18
 SELECT key, count(1) FROM T1_n80 GROUP BY key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n80
+POSTHOOK: Output: default@outputtbl1_n18
 OPTIMIZED SQL: SELECT `key`, COUNT(*) AS `$f1`
 FROM `default`.`t1_n80`
 GROUP BY `key`
@@ -484,10 +488,14 @@ PREHOOK: query: EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE outputTbl2_n5
 SELECT key, val, count(1) FROM T1_n80 GROUP BY key, val
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n80
+PREHOOK: Output: default@outputtbl2_n5
 POSTHOOK: query: EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE outputTbl2_n5
 SELECT key, val, count(1) FROM T1_n80 GROUP BY key, val
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n80
+POSTHOOK: Output: default@outputtbl2_n5
 OPTIMIZED SQL: SELECT `key`, `val`, COUNT(*) AS `$f2`
 FROM `default`.`t1_n80`
 GROUP BY `key`, `val`
@@ -795,10 +803,14 @@ PREHOOK: query: EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE outputTbl1_n18
 SELECT key, count(1) FROM (SELECT key, val FROM T1_n80) subq1 GROUP BY key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n80
+PREHOOK: Output: default@outputtbl1_n18
 POSTHOOK: query: EXPLAIN EXTENDED 
 INSERT OVERWRITE TABLE outputTbl1_n18
 SELECT key, count(1) FROM (SELECT key, val FROM T1_n80) subq1 GROUP BY key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n80
+POSTHOOK: Output: default@outputtbl1_n18
 OPTIMIZED SQL: SELECT `key`, COUNT(*) AS `$f1`
 FROM `default`.`t1_n80`
 GROUP BY `key`
@@ -1233,10 +1245,14 @@ PREHOOK: query: EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE outputTbl1_n18
 SELECT k, count(1) FROM (SELECT key as k, val as v FROM T1_n80) subq1 GROUP BY 
k
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n80
+PREHOOK: Output: default@outputtbl1_n18
 POSTHOOK: query: EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE outputTbl1_n18
 SELECT k, count(1) FROM (SELECT key as k, val as v FROM T1_n80) subq1 GROUP BY 
k
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n80
+POSTHOOK: Output: default@outputtbl1_n18
 OPTIMIZED SQL: SELECT `key`, COUNT(*) AS `$f1`
 FROM `default`.`t1_n80`
 GROUP BY `key`
@@ -1679,10 +1695,14 @@ PREHOOK: query: EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE outputTbl3_n2
 SELECT 1, key, count(1) FROM T1_n80 GROUP BY 1, key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n80
+PREHOOK: Output: default@outputtbl3_n2
 POSTHOOK: query: EXPLAIN EXTENDED 
 INSERT OVERWRITE TABLE outputTbl3_n2
 SELECT 1, key, count(1) FROM T1_n80 GROUP BY 1, key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n80
+POSTHOOK: Output: default@outputtbl3_n2
 OPTIMIZED SQL: SELECT 1 AS `_o__c0`, `key`, COUNT(*) AS `_o__c2`
 FROM `default`.`t1_n80`
 GROUP BY `key`
@@ -2126,10 +2146,14 @@ PREHOOK: query: EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE outputTbl4_n2
 SELECT key, 1, val, count(1) FROM T1_n80 GROUP BY key, 1, val
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n80
+PREHOOK: Output: default@outputtbl4_n2
 POSTHOOK: query: EXPLAIN EXTENDED 
 INSERT OVERWRITE TABLE outputTbl4_n2
 SELECT key, 1, val, count(1) FROM T1_n80 GROUP BY key, 1, val
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n80
+POSTHOOK: Output: default@outputtbl4_n2
 OPTIMIZED SQL: SELECT `key`, 1 AS `_o__c1`, `val`, COUNT(*) AS `_o__c3`
 FROM `default`.`t1_n80`
 GROUP BY `key`, `val`
@@ -2438,10 +2462,14 @@ PREHOOK: query: EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE outputTbl3_n2
 SELECT key, key + 1, count(1) FROM T1_n80 GROUP BY key, key + 1
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n80
+PREHOOK: Output: default@outputtbl3_n2
 POSTHOOK: query: EXPLAIN EXTENDED 
 INSERT OVERWRITE TABLE outputTbl3_n2
 SELECT key, key + 1, count(1) FROM T1_n80 GROUP BY key, key + 1
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n80
+POSTHOOK: Output: default@outputtbl3_n2
 OPTIMIZED SQL: SELECT `key` AS `$f0`, CAST(`key` AS DOUBLE) + CAST(1 AS 
DOUBLE) AS `$f1`, COUNT(*) AS `$f2`
 FROM `default`.`t1_n80`
 GROUP BY `key`, CAST(`key` AS DOUBLE) + CAST(1 AS DOUBLE)
@@ -2750,12 +2778,16 @@ SELECT key + key, sum(cnt) from
 (SELECT key, count(1) as cnt FROM T1_n80 GROUP BY key) subq1
 group by key + key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n80
+PREHOOK: Output: default@outputtbl1_n18
 POSTHOOK: query: EXPLAIN EXTENDED 
 INSERT OVERWRITE TABLE outputTbl1_n18
 SELECT key + key, sum(cnt) from
 (SELECT key, count(1) as cnt FROM T1_n80 GROUP BY key) subq1
 group by key + key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n80
+POSTHOOK: Output: default@outputtbl1_n18
 OPTIMIZED SQL: SELECT CAST(`key` AS DOUBLE) + CAST(`key` AS DOUBLE) AS `$f0`, 
SUM(COUNT(*)) AS `$f1`
 FROM `default`.`t1_n80`
 GROUP BY CAST(`key` AS DOUBLE) + CAST(`key` AS DOUBLE)
@@ -3079,6 +3111,8 @@ SELECT key, count(1) FROM T1_n80 GROUP BY key
 SELECT key, count(1) FROM T1_n80 GROUP BY key
 ) subq1
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n80
+PREHOOK: Output: default@outputtbl1_n18
 POSTHOOK: query: EXPLAIN EXTENDED 
 INSERT OVERWRITE TABLE outputTbl1_n18
 SELECT * FROM (
@@ -3087,6 +3121,8 @@ SELECT key, count(1) FROM T1_n80 GROUP BY key
 SELECT key, count(1) FROM T1_n80 GROUP BY key
 ) subq1
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n80
+POSTHOOK: Output: default@outputtbl1_n18
 OPTIMIZED SQL: SELECT `key`, COUNT(*) AS `$f1`
 FROM `default`.`t1_n80`
 GROUP BY `key`
@@ -3613,6 +3649,8 @@ SELECT key, count(1) FROM T1_n80 GROUP BY key
 SELECT cast(key + key as string) as key, count(1) FROM T1_n80 GROUP BY key + 
key
 ) subq1
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n80
+PREHOOK: Output: default@outputtbl1_n18
 POSTHOOK: query: EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE outputTbl1_n18
 SELECT * FROM (
@@ -3621,6 +3659,8 @@ SELECT key, count(1) FROM T1_n80 GROUP BY key
 SELECT cast(key + key as string) as key, count(1) FROM T1_n80 GROUP BY key + 
key
 ) subq1
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n80
+POSTHOOK: Output: default@outputtbl1_n18
 OPTIMIZED SQL: SELECT `key`, COUNT(*) AS `$f1`
 FROM `default`.`t1_n80`
 GROUP BY `key`
@@ -4274,6 +4314,8 @@ JOIN
 (SELECT key, count(1) as cnt FROM T1_n80 GROUP BY key) subq2
 ON subq1.key = subq2.key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n80
+PREHOOK: Output: default@outputtbl1_n18
 POSTHOOK: query: EXPLAIN EXTENDED 
 INSERT OVERWRITE TABLE outputTbl1_n18
 SELECT subq1.key, subq1.cnt+subq2.cnt FROM 
@@ -4282,6 +4324,8 @@ JOIN
 (SELECT key, count(1) as cnt FROM T1_n80 GROUP BY key) subq2
 ON subq1.key = subq2.key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n80
+POSTHOOK: Output: default@outputtbl1_n18
 OPTIMIZED SQL: SELECT `t0`.`key`, `t0`.`$f1` + `t2`.`$f1` AS `_o__c1`
 FROM (SELECT `key`, COUNT(*) AS `$f1`
 FROM `default`.`t1_n80`
@@ -4628,6 +4672,8 @@ JOIN
 (SELECT key, val, count(1) FROM T1_n80 GROUP BY key, val) subq2
 ON subq1.key = subq2.key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n80
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN EXTENDED 
 SELECT * FROM 
 (SELECT key, count(1) FROM T1_n80 GROUP BY key) subq1
@@ -4635,6 +4681,8 @@ JOIN
 (SELECT key, val, count(1) FROM T1_n80 GROUP BY key, val) subq2
 ON subq1.key = subq2.key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n80
+#### A masked pattern was here ####
 OPTIMIZED SQL: SELECT *
 FROM (SELECT `key`, COUNT(*) AS `$f1`
 FROM `default`.`t1_n80`
@@ -4941,10 +4989,14 @@ PREHOOK: query: EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE outputTbl1_n18
 SELECT key, count(1) FROM T2_n49 GROUP BY key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t2_n49
+PREHOOK: Output: default@outputtbl1_n18
 POSTHOOK: query: EXPLAIN EXTENDED 
 INSERT OVERWRITE TABLE outputTbl1_n18
 SELECT key, count(1) FROM T2_n49 GROUP BY key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t2_n49
+POSTHOOK: Output: default@outputtbl1_n18
 OPTIMIZED SQL: SELECT `key`, COUNT(*) AS `$f1`
 FROM `default`.`t2_n49`
 GROUP BY `key`
@@ -5251,10 +5303,14 @@ PREHOOK: query: EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE outputTbl4_n2
 SELECT key, 1, val, count(1) FROM T2_n49 GROUP BY key, 1, val
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t2_n49
+PREHOOK: Output: default@outputtbl4_n2
 POSTHOOK: query: EXPLAIN EXTENDED 
 INSERT OVERWRITE TABLE outputTbl4_n2
 SELECT key, 1, val, count(1) FROM T2_n49 GROUP BY key, 1, val
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t2_n49
+POSTHOOK: Output: default@outputtbl4_n2
 OPTIMIZED SQL: SELECT `key`, 1 AS `_o__c1`, `val`, COUNT(*) AS `_o__c3`
 FROM `default`.`t2_n49`
 GROUP BY `key`, `val`
@@ -5700,10 +5756,14 @@ PREHOOK: query: EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE outputTbl5_n2
 SELECT key, 1, val, 2, count(1) FROM T2_n49 GROUP BY key, 1, val, 2
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t2_n49
+PREHOOK: Output: default@outputtbl5_n2
 POSTHOOK: query: EXPLAIN EXTENDED 
 INSERT OVERWRITE TABLE outputTbl5_n2
 SELECT key, 1, val, 2, count(1) FROM T2_n49 GROUP BY key, 1, val, 2
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t2_n49
+POSTHOOK: Output: default@outputtbl5_n2
 OPTIMIZED SQL: SELECT `key`, 1 AS `_o__c1`, `val`, 2 AS `_o__c3`, COUNT(*) AS 
`_o__c4`
 FROM `default`.`t2_n49`
 GROUP BY `key`, `val`
@@ -6146,12 +6206,16 @@ SELECT key, constant, val, count(1) from
 (SELECT key, 1 as constant, val from T2_n49)subq
 group by key, constant, val
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t2_n49
+PREHOOK: Output: default@outputtbl4_n2
 POSTHOOK: query: EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE outputTbl4_n2
 SELECT key, constant, val, count(1) from 
 (SELECT key, 1 as constant, val from T2_n49)subq
 group by key, constant, val
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t2_n49
+POSTHOOK: Output: default@outputtbl4_n2
 OPTIMIZED SQL: SELECT `key`, 1 AS `constant`, `val`, COUNT(*) AS `_o__c3`
 FROM `default`.`t2_n49`
 GROUP BY `key`, `val`
@@ -6598,6 +6662,8 @@ SELECT key, constant as constant2, val, 2 as constant3 
from
 )subq2
 group by key, constant3, val
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t2_n49
+PREHOOK: Output: default@outputtbl4_n2
 POSTHOOK: query: EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE outputTbl4_n2
 select key, constant3, val, count(1) from
@@ -6607,6 +6673,8 @@ SELECT key, constant as constant2, val, 2 as constant3 
from
 )subq2
 group by key, constant3, val
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t2_n49
+POSTHOOK: Output: default@outputtbl4_n2
 OPTIMIZED SQL: SELECT `key`, 2 AS `constant3`, `val`, COUNT(*) AS `_o__c3`
 FROM `default`.`t2_n49`
 GROUP BY `key`, `val`
@@ -7071,11 +7139,17 @@ FROM T2_n49
 INSERT OVERWRITE TABLE DEST1_n80 SELECT key, count(1) GROUP BY key
 INSERT OVERWRITE TABLE DEST2_n18 SELECT key, val, count(1) GROUP BY key, val
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t2_n49
+PREHOOK: Output: default@dest1_n80
+PREHOOK: Output: default@dest2_n18
 POSTHOOK: query: EXPLAIN
 FROM T2_n49
 INSERT OVERWRITE TABLE DEST1_n80 SELECT key, count(1) GROUP BY key
 INSERT OVERWRITE TABLE DEST2_n18 SELECT key, val, count(1) GROUP BY key, val
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t2_n49
+POSTHOOK: Output: default@dest1_n80
+POSTHOOK: Output: default@dest2_n18
 STAGE DEPENDENCIES:
   Stage-2 is a root stage
   Stage-0 depends on stages: Stage-2
@@ -7314,11 +7388,17 @@ FROM (select key, val from T2_n49 where key = 8) x
 INSERT OVERWRITE TABLE DEST1_n80 SELECT key, count(1) GROUP BY key
 INSERT OVERWRITE TABLE DEST2_n18 SELECT key, val, count(1) GROUP BY key, val
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t2_n49
+PREHOOK: Output: default@dest1_n80
+PREHOOK: Output: default@dest2_n18
 POSTHOOK: query: EXPLAIN
 FROM (select key, val from T2_n49 where key = 8) x
 INSERT OVERWRITE TABLE DEST1_n80 SELECT key, count(1) GROUP BY key
 INSERT OVERWRITE TABLE DEST2_n18 SELECT key, val, count(1) GROUP BY key, val
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t2_n49
+POSTHOOK: Output: default@dest1_n80
+POSTHOOK: Output: default@dest2_n18
 STAGE DEPENDENCIES:
   Stage-2 is a root stage
   Stage-0 depends on stages: Stage-2

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_sort_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_sort_2.q.out 
b/ql/src/test/results/clientpositive/groupby_sort_2.q.out
index d75dafd..d1e00ab 100644
--- a/ql/src/test/results/clientpositive/groupby_sort_2.q.out
+++ b/ql/src/test/results/clientpositive/groupby_sort_2.q.out
@@ -38,10 +38,14 @@ PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE outputTbl1_n10
 SELECT val, count(1) FROM T1_n51 GROUP BY val
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n51
+PREHOOK: Output: default@outputtbl1_n10
 POSTHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE outputTbl1_n10
 SELECT val, count(1) FROM T1_n51 GROUP BY val
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n51
+POSTHOOK: Output: default@outputtbl1_n10
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_sort_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_sort_3.q.out 
b/ql/src/test/results/clientpositive/groupby_sort_3.q.out
index 2054597..971eca9 100644
--- a/ql/src/test/results/clientpositive/groupby_sort_3.q.out
+++ b/ql/src/test/results/clientpositive/groupby_sort_3.q.out
@@ -38,10 +38,14 @@ PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE outputTbl1_n20
 SELECT key, val, count(1) FROM T1_n89 GROUP BY key, val
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n89
+PREHOOK: Output: default@outputtbl1_n20
 POSTHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE outputTbl1_n20
 SELECT key, val, count(1) FROM T1_n89 GROUP BY key, val
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n89
+POSTHOOK: Output: default@outputtbl1_n20
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-7 depends on stages: Stage-1 , consists of Stage-4, Stage-3, Stage-5
@@ -204,10 +208,14 @@ PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE outputTbl2_n7
 SELECT key, count(1) FROM T1_n89 GROUP BY key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n89
+PREHOOK: Output: default@outputtbl2_n7
 POSTHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE outputTbl2_n7
 SELECT key, count(1) FROM T1_n89 GROUP BY key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n89
+POSTHOOK: Output: default@outputtbl2_n7
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-7 depends on stages: Stage-1 , consists of Stage-4, Stage-3, Stage-5

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_sort_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_sort_4.q.out 
b/ql/src/test/results/clientpositive/groupby_sort_4.q.out
index 043d51b..6fd75b0 100644
--- a/ql/src/test/results/clientpositive/groupby_sort_4.q.out
+++ b/ql/src/test/results/clientpositive/groupby_sort_4.q.out
@@ -38,10 +38,14 @@ PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE outputTbl1_n31
 SELECT key, count(1) FROM T1_n133 GROUP BY key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n133
+PREHOOK: Output: default@outputtbl1_n31
 POSTHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE outputTbl1_n31
 SELECT key, count(1) FROM T1_n133 GROUP BY key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n133
+POSTHOOK: Output: default@outputtbl1_n31
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -186,10 +190,14 @@ PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE outputTbl2_n8
 SELECT key, val, count(1) FROM T1_n133 GROUP BY key, val
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n133
+PREHOOK: Output: default@outputtbl2_n8
 POSTHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE outputTbl2_n8
 SELECT key, val, count(1) FROM T1_n133 GROUP BY key, val
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n133
+POSTHOOK: Output: default@outputtbl2_n8
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_sort_5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_sort_5.q.out 
b/ql/src/test/results/clientpositive/groupby_sort_5.q.out
index 04b9cee..103f45f 100644
--- a/ql/src/test/results/clientpositive/groupby_sort_5.q.out
+++ b/ql/src/test/results/clientpositive/groupby_sort_5.q.out
@@ -38,10 +38,14 @@ PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE outputTbl1_n5
 SELECT key, val, count(1) FROM T1_n6 GROUP BY key, val
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n6
+PREHOOK: Output: default@outputtbl1_n5
 POSTHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE outputTbl1_n5
 SELECT key, val, count(1) FROM T1_n6 GROUP BY key, val
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n6
+POSTHOOK: Output: default@outputtbl1_n5
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-7 depends on stages: Stage-1 , consists of Stage-4, Stage-3, Stage-5
@@ -232,10 +236,14 @@ PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE outputTbl1_n5
 SELECT key, val, count(1) FROM T1_n6 GROUP BY key, val
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n6
+PREHOOK: Output: default@outputtbl1_n5
 POSTHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE outputTbl1_n5
 SELECT key, val, count(1) FROM T1_n6 GROUP BY key, val
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n6
+POSTHOOK: Output: default@outputtbl1_n5
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-7 depends on stages: Stage-1 , consists of Stage-4, Stage-3, Stage-5
@@ -434,10 +442,14 @@ PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE outputTbl2_n1
 SELECT key, count(1) FROM T1_n6 GROUP BY key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n6
+PREHOOK: Output: default@outputtbl2_n1
 POSTHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE outputTbl2_n1
 SELECT key, count(1) FROM T1_n6 GROUP BY key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n6
+POSTHOOK: Output: default@outputtbl2_n1
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_sort_6.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_sort_6.q.out 
b/ql/src/test/results/clientpositive/groupby_sort_6.q.out
index 07803b0..193dd34 100644
--- a/ql/src/test/results/clientpositive/groupby_sort_6.q.out
+++ b/ql/src/test/results/clientpositive/groupby_sort_6.q.out
@@ -18,10 +18,14 @@ PREHOOK: query: EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE outputTbl1_n15
 SELECT key, count(1) FROM T1_n61 where ds = '1' GROUP BY key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n61
+PREHOOK: Output: default@outputtbl1_n15
 POSTHOOK: query: EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE outputTbl1_n15
 SELECT key, count(1) FROM T1_n61 where ds = '1' GROUP BY key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n61
+POSTHOOK: Output: default@outputtbl1_n15
 OPTIMIZED SQL: SELECT `key`, COUNT(*) AS `$f1`
 FROM `default`.`t1_n61`
 WHERE `ds` = '1'
@@ -279,10 +283,14 @@ PREHOOK: query: EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE outputTbl1_n15
 SELECT key, count(1) FROM T1_n61 where ds = '1' GROUP BY key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n61
+PREHOOK: Output: default@outputtbl1_n15
 POSTHOOK: query: EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE outputTbl1_n15
 SELECT key, count(1) FROM T1_n61 where ds = '1' GROUP BY key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n61
+POSTHOOK: Output: default@outputtbl1_n15
 OPTIMIZED SQL: SELECT `key`, COUNT(*) AS `$f1`
 FROM `default`.`t1_n61`
 WHERE `ds` = '1'
@@ -531,10 +539,16 @@ PREHOOK: query: EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE outputTbl1_n15
 SELECT key, count(1) FROM T1_n61 where ds = '2' GROUP BY key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n61
+PREHOOK: Input: default@t1_n61@ds=2
+PREHOOK: Output: default@outputtbl1_n15
 POSTHOOK: query: EXPLAIN EXTENDED
 INSERT OVERWRITE TABLE outputTbl1_n15
 SELECT key, count(1) FROM T1_n61 where ds = '2' GROUP BY key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n61
+POSTHOOK: Input: default@t1_n61@ds=2
+POSTHOOK: Output: default@outputtbl1_n15
 OPTIMIZED SQL: SELECT `key`, COUNT(*) AS `$f1`
 FROM `default`.`t1_n61`
 WHERE `ds` = '2'

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_sort_7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_sort_7.q.out 
b/ql/src/test/results/clientpositive/groupby_sort_7.q.out
index 4170788..2e12e1e 100644
--- a/ql/src/test/results/clientpositive/groupby_sort_7.q.out
+++ b/ql/src/test/results/clientpositive/groupby_sort_7.q.out
@@ -41,10 +41,16 @@ PREHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE outputTbl1_n26
 SELECT key, val, count(1) FROM T1_n104 where ds = '1' GROUP BY key, val
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n104
+PREHOOK: Input: default@t1_n104@ds=1
+PREHOOK: Output: default@outputtbl1_n26
 POSTHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE outputTbl1_n26
 SELECT key, val, count(1) FROM T1_n104 where ds = '1' GROUP BY key, val
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n104
+POSTHOOK: Input: default@t1_n104@ds=1
+POSTHOOK: Output: default@outputtbl1_n26
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-7 depends on stages: Stage-1 , consists of Stage-4, Stage-3, Stage-5

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_sort_8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_sort_8.q.out 
b/ql/src/test/results/clientpositive/groupby_sort_8.q.out
index fabca6e..14876a0 100644
--- a/ql/src/test/results/clientpositive/groupby_sort_8.q.out
+++ b/ql/src/test/results/clientpositive/groupby_sort_8.q.out
@@ -32,9 +32,15 @@ POSTHOOK: Lineage: t1_n45 PARTITION(ds=1).val SIMPLE 
[(t1_n45)t1_n45.FieldSchema
 PREHOOK: query: EXPLAIN
 select count(distinct key) from T1_n45
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n45
+PREHOOK: Input: default@t1_n45@ds=1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 select count(distinct key) from T1_n45
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n45
+POSTHOOK: Input: default@t1_n45@ds=1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/groupby_sort_9.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/groupby_sort_9.q.out 
b/ql/src/test/results/clientpositive/groupby_sort_9.q.out
index 595e147..d47bfe9 100644
--- a/ql/src/test/results/clientpositive/groupby_sort_9.q.out
+++ b/ql/src/test/results/clientpositive/groupby_sort_9.q.out
@@ -44,9 +44,17 @@ POSTHOOK: Lineage: t1_n96 PARTITION(ds=2).val SIMPLE 
[(t1_n96)t1_n96.FieldSchema
 PREHOOK: query: EXPLAIN
 select key, count(1) from T1_n96 group by key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n96
+PREHOOK: Input: default@t1_n96@ds=1
+PREHOOK: Input: default@t1_n96@ds=2
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 select key, count(1) from T1_n96 group by key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n96
+POSTHOOK: Input: default@t1_n96@ds=1
+POSTHOOK: Input: default@t1_n96@ds=2
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1

Reply via email to