http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/columnstats_partlvl_dp.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/columnstats_partlvl_dp.q.out 
b/ql/src/test/results/clientpositive/columnstats_partlvl_dp.q.out
index 7d83d6e..f2a9094 100644
--- a/ql/src/test/results/clientpositive/columnstats_partlvl_dp.q.out
+++ b/ql/src/test/results/clientpositive/columnstats_partlvl_dp.q.out
@@ -69,9 +69,19 @@ POSTHOOK: Output: 
default@employee_part_n0@employeesalary=3000.0/country=UK
 PREHOOK: query: explain 
 analyze table Employee_Part_n0 partition (employeeSalary='4000.0', country) 
compute statistics for columns employeeName, employeeID
 PREHOOK: type: ANALYZE_TABLE
+PREHOOK: Input: default@employee_part_n0
+PREHOOK: Input: default@employee_part_n0@employeesalary=4000.0/country=USA
+PREHOOK: Output: default@employee_part_n0
+PREHOOK: Output: default@employee_part_n0@employeesalary=4000.0/country=USA
+#### A masked pattern was here ####
 POSTHOOK: query: explain 
 analyze table Employee_Part_n0 partition (employeeSalary='4000.0', country) 
compute statistics for columns employeeName, employeeID
 POSTHOOK: type: ANALYZE_TABLE
+POSTHOOK: Input: default@employee_part_n0
+POSTHOOK: Input: default@employee_part_n0@employeesalary=4000.0/country=USA
+POSTHOOK: Output: default@employee_part_n0
+POSTHOOK: Output: default@employee_part_n0@employeesalary=4000.0/country=USA
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
   Stage-1 depends on stages: Stage-0
@@ -200,9 +210,23 @@ comment                    from deserializer
 PREHOOK: query: explain        
 analyze table Employee_Part_n0 partition (employeeSalary='2000.0') compute 
statistics for columns employeeID
 PREHOOK: type: ANALYZE_TABLE
+PREHOOK: Input: default@employee_part_n0
+PREHOOK: Input: default@employee_part_n0@employeesalary=2000.0/country=UK
+PREHOOK: Input: default@employee_part_n0@employeesalary=2000.0/country=USA
+PREHOOK: Output: default@employee_part_n0
+PREHOOK: Output: default@employee_part_n0@employeesalary=2000.0/country=UK
+PREHOOK: Output: default@employee_part_n0@employeesalary=2000.0/country=USA
+#### A masked pattern was here ####
 POSTHOOK: query: explain       
 analyze table Employee_Part_n0 partition (employeeSalary='2000.0') compute 
statistics for columns employeeID
 POSTHOOK: type: ANALYZE_TABLE
+POSTHOOK: Input: default@employee_part_n0
+POSTHOOK: Input: default@employee_part_n0@employeesalary=2000.0/country=UK
+POSTHOOK: Input: default@employee_part_n0@employeesalary=2000.0/country=USA
+POSTHOOK: Output: default@employee_part_n0
+POSTHOOK: Output: default@employee_part_n0@employeesalary=2000.0/country=UK
+POSTHOOK: Output: default@employee_part_n0@employeesalary=2000.0/country=USA
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
   Stage-1 depends on stages: Stage-0
@@ -314,9 +338,39 @@ comment                    from deserializer
 PREHOOK: query: explain        
 analyze table Employee_Part_n0 partition (employeeSalary) compute statistics 
for columns employeeID
 PREHOOK: type: ANALYZE_TABLE
+PREHOOK: Input: default@employee_part_n0
+PREHOOK: Input: default@employee_part_n0@employeesalary=2000.0/country=UK
+PREHOOK: Input: default@employee_part_n0@employeesalary=2000.0/country=USA
+PREHOOK: Input: default@employee_part_n0@employeesalary=3000.0/country=UK
+PREHOOK: Input: default@employee_part_n0@employeesalary=3000.0/country=USA
+PREHOOK: Input: default@employee_part_n0@employeesalary=3500.0/country=UK
+PREHOOK: Input: default@employee_part_n0@employeesalary=4000.0/country=USA
+PREHOOK: Output: default@employee_part_n0
+PREHOOK: Output: default@employee_part_n0@employeesalary=2000.0/country=UK
+PREHOOK: Output: default@employee_part_n0@employeesalary=2000.0/country=USA
+PREHOOK: Output: default@employee_part_n0@employeesalary=3000.0/country=UK
+PREHOOK: Output: default@employee_part_n0@employeesalary=3000.0/country=USA
+PREHOOK: Output: default@employee_part_n0@employeesalary=3500.0/country=UK
+PREHOOK: Output: default@employee_part_n0@employeesalary=4000.0/country=USA
+#### A masked pattern was here ####
 POSTHOOK: query: explain       
 analyze table Employee_Part_n0 partition (employeeSalary) compute statistics 
for columns employeeID
 POSTHOOK: type: ANALYZE_TABLE
+POSTHOOK: Input: default@employee_part_n0
+POSTHOOK: Input: default@employee_part_n0@employeesalary=2000.0/country=UK
+POSTHOOK: Input: default@employee_part_n0@employeesalary=2000.0/country=USA
+POSTHOOK: Input: default@employee_part_n0@employeesalary=3000.0/country=UK
+POSTHOOK: Input: default@employee_part_n0@employeesalary=3000.0/country=USA
+POSTHOOK: Input: default@employee_part_n0@employeesalary=3500.0/country=UK
+POSTHOOK: Input: default@employee_part_n0@employeesalary=4000.0/country=USA
+POSTHOOK: Output: default@employee_part_n0
+POSTHOOK: Output: default@employee_part_n0@employeesalary=2000.0/country=UK
+POSTHOOK: Output: default@employee_part_n0@employeesalary=2000.0/country=USA
+POSTHOOK: Output: default@employee_part_n0@employeesalary=3000.0/country=UK
+POSTHOOK: Output: default@employee_part_n0@employeesalary=3000.0/country=USA
+POSTHOOK: Output: default@employee_part_n0@employeesalary=3500.0/country=UK
+POSTHOOK: Output: default@employee_part_n0@employeesalary=4000.0/country=USA
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
   Stage-1 depends on stages: Stage-0
@@ -426,9 +480,39 @@ comment                    from deserializer
 PREHOOK: query: explain        
 analyze table Employee_Part_n0 partition (employeeSalary,country) compute 
statistics for columns
 PREHOOK: type: ANALYZE_TABLE
+PREHOOK: Input: default@employee_part_n0
+PREHOOK: Input: default@employee_part_n0@employeesalary=2000.0/country=UK
+PREHOOK: Input: default@employee_part_n0@employeesalary=2000.0/country=USA
+PREHOOK: Input: default@employee_part_n0@employeesalary=3000.0/country=UK
+PREHOOK: Input: default@employee_part_n0@employeesalary=3000.0/country=USA
+PREHOOK: Input: default@employee_part_n0@employeesalary=3500.0/country=UK
+PREHOOK: Input: default@employee_part_n0@employeesalary=4000.0/country=USA
+PREHOOK: Output: default@employee_part_n0
+PREHOOK: Output: default@employee_part_n0@employeesalary=2000.0/country=UK
+PREHOOK: Output: default@employee_part_n0@employeesalary=2000.0/country=USA
+PREHOOK: Output: default@employee_part_n0@employeesalary=3000.0/country=UK
+PREHOOK: Output: default@employee_part_n0@employeesalary=3000.0/country=USA
+PREHOOK: Output: default@employee_part_n0@employeesalary=3500.0/country=UK
+PREHOOK: Output: default@employee_part_n0@employeesalary=4000.0/country=USA
+#### A masked pattern was here ####
 POSTHOOK: query: explain       
 analyze table Employee_Part_n0 partition (employeeSalary,country) compute 
statistics for columns
 POSTHOOK: type: ANALYZE_TABLE
+POSTHOOK: Input: default@employee_part_n0
+POSTHOOK: Input: default@employee_part_n0@employeesalary=2000.0/country=UK
+POSTHOOK: Input: default@employee_part_n0@employeesalary=2000.0/country=USA
+POSTHOOK: Input: default@employee_part_n0@employeesalary=3000.0/country=UK
+POSTHOOK: Input: default@employee_part_n0@employeesalary=3000.0/country=USA
+POSTHOOK: Input: default@employee_part_n0@employeesalary=3500.0/country=UK
+POSTHOOK: Input: default@employee_part_n0@employeesalary=4000.0/country=USA
+POSTHOOK: Output: default@employee_part_n0
+POSTHOOK: Output: default@employee_part_n0@employeesalary=2000.0/country=UK
+POSTHOOK: Output: default@employee_part_n0@employeesalary=2000.0/country=USA
+POSTHOOK: Output: default@employee_part_n0@employeesalary=3000.0/country=UK
+POSTHOOK: Output: default@employee_part_n0@employeesalary=3000.0/country=USA
+POSTHOOK: Output: default@employee_part_n0@employeesalary=3500.0/country=UK
+POSTHOOK: Output: default@employee_part_n0@employeesalary=4000.0/country=USA
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
   Stage-1 depends on stages: Stage-0

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/columnstats_quoting.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/columnstats_quoting.q.out 
b/ql/src/test/results/clientpositive/columnstats_quoting.q.out
index 8ed8239..9bf560b 100644
--- a/ql/src/test/results/clientpositive/columnstats_quoting.q.out
+++ b/ql/src/test/results/clientpositive/columnstats_quoting.q.out
@@ -12,8 +12,14 @@ POSTHOOK: Output: database:default
 POSTHOOK: Output: default@user_web_events
 PREHOOK: query: explain analyze table user_web_events compute statistics for 
columns
 PREHOOK: type: ANALYZE_TABLE
+PREHOOK: Input: default@user_web_events
+PREHOOK: Output: default@user_web_events
+#### A masked pattern was here ####
 POSTHOOK: query: explain analyze table user_web_events compute statistics for 
columns
 POSTHOOK: type: ANALYZE_TABLE
+POSTHOOK: Input: default@user_web_events
+POSTHOOK: Output: default@user_web_events
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
   Stage-1 depends on stages: Stage-0
@@ -72,8 +78,14 @@ POSTHOOK: Output: default@user_web_events
 #### A masked pattern was here ####
 PREHOOK: query: explain analyze table user_web_events compute statistics for 
columns `user id`
 PREHOOK: type: ANALYZE_TABLE
+PREHOOK: Input: default@user_web_events
+PREHOOK: Output: default@user_web_events
+#### A masked pattern was here ####
 POSTHOOK: query: explain analyze table user_web_events compute statistics for 
columns `user id`
 POSTHOOK: type: ANALYZE_TABLE
+POSTHOOK: Input: default@user_web_events
+POSTHOOK: Output: default@user_web_events
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
   Stage-1 depends on stages: Stage-0

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/columnstats_tbllvl.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/columnstats_tbllvl.q.out 
b/ql/src/test/results/clientpositive/columnstats_tbllvl.q.out
index 0b4bb47..d21d209 100644
--- a/ql/src/test/results/clientpositive/columnstats_tbllvl.q.out
+++ b/ql/src/test/results/clientpositive/columnstats_tbllvl.q.out
@@ -41,9 +41,15 @@ POSTHOOK: Output: default@uservisits_web_text_none
 PREHOOK: query: explain 
 analyze table UserVisits_web_text_none compute statistics for columns 
sourceIP, avgTimeOnSite, adRevenue
 PREHOOK: type: ANALYZE_TABLE
+PREHOOK: Input: default@uservisits_web_text_none
+PREHOOK: Output: default@uservisits_web_text_none
+#### A masked pattern was here ####
 POSTHOOK: query: explain 
 analyze table UserVisits_web_text_none compute statistics for columns 
sourceIP, avgTimeOnSite, adRevenue
 POSTHOOK: type: ANALYZE_TABLE
+POSTHOOK: Input: default@uservisits_web_text_none
+POSTHOOK: Output: default@uservisits_web_text_none
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
   Stage-1 depends on stages: Stage-0
@@ -93,9 +99,15 @@ STAGE PLANS:
 PREHOOK: query: explain extended
 analyze table UserVisits_web_text_none compute statistics for columns 
sourceIP, avgTimeOnSite, adRevenue
 PREHOOK: type: ANALYZE_TABLE
+PREHOOK: Input: default@uservisits_web_text_none
+PREHOOK: Output: default@uservisits_web_text_none
+#### A masked pattern was here ####
 POSTHOOK: query: explain extended
 analyze table UserVisits_web_text_none compute statistics for columns 
sourceIP, avgTimeOnSite, adRevenue
 POSTHOOK: type: ANALYZE_TABLE
+POSTHOOK: Input: default@uservisits_web_text_none
+POSTHOOK: Output: default@uservisits_web_text_none
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
   Stage-1 depends on stages: Stage-0
@@ -231,9 +243,15 @@ POSTHOOK: Output: default@uservisits_web_text_none
 PREHOOK: query: explain 
 analyze table default.UserVisits_web_text_none compute statistics for columns
 PREHOOK: type: ANALYZE_TABLE
+PREHOOK: Input: default@uservisits_web_text_none
+PREHOOK: Output: default@uservisits_web_text_none
+#### A masked pattern was here ####
 POSTHOOK: query: explain 
 analyze table default.UserVisits_web_text_none compute statistics for columns
 POSTHOOK: type: ANALYZE_TABLE
+POSTHOOK: Input: default@uservisits_web_text_none
+POSTHOOK: Output: default@uservisits_web_text_none
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
   Stage-1 depends on stages: Stage-0
@@ -370,9 +388,15 @@ POSTHOOK: Output: default@empty_tab
 PREHOOK: query: explain 
 analyze table empty_tab compute statistics for columns a,b,c,d,e
 PREHOOK: type: ANALYZE_TABLE
+PREHOOK: Input: default@empty_tab
+PREHOOK: Output: default@empty_tab
+#### A masked pattern was here ####
 POSTHOOK: query: explain 
 analyze table empty_tab compute statistics for columns a,b,c,d,e
 POSTHOOK: type: ANALYZE_TABLE
+POSTHOOK: Input: default@empty_tab
+POSTHOOK: Output: default@empty_tab
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
   Stage-1 depends on stages: Stage-0
@@ -515,9 +539,15 @@ POSTHOOK: Input: database:default
 PREHOOK: query: explain 
 analyze table dummydb.UserVisits_in_dummy_db compute statistics for columns 
sourceIP, avgTimeOnSite, adRevenue
 PREHOOK: type: ANALYZE_TABLE
+PREHOOK: Input: dummydb@uservisits_in_dummy_db
+PREHOOK: Output: dummydb@uservisits_in_dummy_db
+#### A masked pattern was here ####
 POSTHOOK: query: explain 
 analyze table dummydb.UserVisits_in_dummy_db compute statistics for columns 
sourceIP, avgTimeOnSite, adRevenue
 POSTHOOK: type: ANALYZE_TABLE
+POSTHOOK: Input: dummydb@uservisits_in_dummy_db
+POSTHOOK: Output: dummydb@uservisits_in_dummy_db
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
   Stage-1 depends on stages: Stage-0
@@ -567,9 +597,15 @@ STAGE PLANS:
 PREHOOK: query: explain extended
 analyze table dummydb.UserVisits_in_dummy_db compute statistics for columns 
sourceIP, avgTimeOnSite, adRevenue
 PREHOOK: type: ANALYZE_TABLE
+PREHOOK: Input: dummydb@uservisits_in_dummy_db
+PREHOOK: Output: dummydb@uservisits_in_dummy_db
+#### A masked pattern was here ####
 POSTHOOK: query: explain extended
 analyze table dummydb.UserVisits_in_dummy_db compute statistics for columns 
sourceIP, avgTimeOnSite, adRevenue
 POSTHOOK: type: ANALYZE_TABLE
+POSTHOOK: Input: dummydb@uservisits_in_dummy_db
+POSTHOOK: Output: dummydb@uservisits_in_dummy_db
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
   Stage-1 depends on stages: Stage-0
@@ -705,9 +741,15 @@ POSTHOOK: Output: dummydb@uservisits_in_dummy_db
 PREHOOK: query: explain 
 analyze table dummydb.UserVisits_in_dummy_db compute statistics for columns
 PREHOOK: type: ANALYZE_TABLE
+PREHOOK: Input: dummydb@uservisits_in_dummy_db
+PREHOOK: Output: dummydb@uservisits_in_dummy_db
+#### A masked pattern was here ####
 POSTHOOK: query: explain 
 analyze table dummydb.UserVisits_in_dummy_db compute statistics for columns
 POSTHOOK: type: ANALYZE_TABLE
+POSTHOOK: Input: dummydb@uservisits_in_dummy_db
+POSTHOOK: Output: dummydb@uservisits_in_dummy_db
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
   Stage-1 depends on stages: Stage-0

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/combine2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/combine2.q.out 
b/ql/src/test/results/clientpositive/combine2.q.out
index 416f092..9ecc81d 100644
--- a/ql/src/test/results/clientpositive/combine2.q.out
+++ b/ql/src/test/results/clientpositive/combine2.q.out
@@ -64,9 +64,29 @@ value=|
 PREHOOK: query: explain
 select key, value from combine2_n0 where value is not null
 PREHOOK: type: QUERY
+PREHOOK: Input: default@combine2_n0
+PREHOOK: Input: default@combine2_n0@value=2010-04-21 09%3A45%3A00
+PREHOOK: Input: default@combine2_n0@value=val_0
+PREHOOK: Input: default@combine2_n0@value=val_2
+PREHOOK: Input: default@combine2_n0@value=val_4
+PREHOOK: Input: default@combine2_n0@value=val_5
+PREHOOK: Input: default@combine2_n0@value=val_8
+PREHOOK: Input: default@combine2_n0@value=val_9
+PREHOOK: Input: default@combine2_n0@value=|
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select key, value from combine2_n0 where value is not null
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@combine2_n0
+POSTHOOK: Input: default@combine2_n0@value=2010-04-21 09%3A45%3A00
+POSTHOOK: Input: default@combine2_n0@value=val_0
+POSTHOOK: Input: default@combine2_n0@value=val_2
+POSTHOOK: Input: default@combine2_n0@value=val_4
+POSTHOOK: Input: default@combine2_n0@value=val_5
+POSTHOOK: Input: default@combine2_n0@value=val_8
+POSTHOOK: Input: default@combine2_n0@value=val_9
+POSTHOOK: Input: default@combine2_n0@value=|
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
 
@@ -123,9 +143,13 @@ POSTHOOK: Input: default@combine2_n0@value=|
 PREHOOK: query: explain extended
 select count(1) from combine2_n0 where value is not null
 PREHOOK: type: QUERY
+PREHOOK: Input: default@combine2_n0
+#### A masked pattern was here ####
 POSTHOOK: query: explain extended
 select count(1) from combine2_n0 where value is not null
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@combine2_n0
+#### A masked pattern was here ####
 OPTIMIZED SQL: SELECT COUNT(*) AS `$f0`
 FROM `default`.`combine2_n0`
 WHERE `value` IS NOT NULL
@@ -151,9 +175,21 @@ POSTHOOK: Input: default@combine2_n0
 PREHOOK: query: explain
 select ds, count(1) from srcpart where ds is not null group by ds
 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: Input: default@srcpart@ds=2008-04-09/hr=11
+PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=12
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select ds, count(1) from srcpart where ds is not null group by ds
 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: Input: default@srcpart@ds=2008-04-09/hr=11
+POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=12
+#### 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/comments.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/comments.q.out 
b/ql/src/test/results/clientpositive/comments.q.out
index 668aa43..d28b2a0 100644
--- a/ql/src/test/results/clientpositive/comments.q.out
+++ b/ql/src/test/results/clientpositive/comments.q.out
@@ -73,8 +73,12 @@ POSTHOOK: Input: default@src
 1019
 PREHOOK: query: explain extended select /*+ MAPJOIN(a) */ count(*) from src a 
join src b on a.key = b.key where a.key > 0
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
 POSTHOOK: query: explain extended select /*+ MAPJOIN(a) */ count(*) from src a 
join src b on a.key = b.key where a.key > 0
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
 OPTIMIZED SQL: SELECT COUNT(*) AS `$f0`
 FROM (SELECT `key`
 FROM `default`.`src`

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/complex_alias.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/complex_alias.q.out 
b/ql/src/test/results/clientpositive/complex_alias.q.out
index e74132d..94474d3 100644
--- a/ql/src/test/results/clientpositive/complex_alias.q.out
+++ b/ql/src/test/results/clientpositive/complex_alias.q.out
@@ -40,6 +40,8 @@ FROM   (SELECT Sum(agg1.col2) AS a1
                        alias.a1) single_use_subq11
          ON ( single_use_subq11.a0 = single_use_subq11.a0 )
 PREHOOK: type: QUERY
+PREHOOK: Input: default@agg1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT single_use_subq11.a1 AS a1,
        single_use_subq11.a2 AS a2
@@ -62,6 +64,8 @@ FROM   (SELECT Sum(agg1.col2) AS a1
                        alias.a1) single_use_subq11
          ON ( single_use_subq11.a0 = single_use_subq11.a0 )
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@agg1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/compute_stats_date.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/compute_stats_date.q.out 
b/ql/src/test/results/clientpositive/compute_stats_date.q.out
index 58d2d70..dcec5fb 100644
--- a/ql/src/test/results/clientpositive/compute_stats_date.q.out
+++ b/ql/src/test/results/clientpositive/compute_stats_date.q.out
@@ -47,9 +47,15 @@ POSTHOOK: Input: default@tab_date
 PREHOOK: query: explain
 analyze table tab_date compute statistics for columns fl_date
 PREHOOK: type: ANALYZE_TABLE
+PREHOOK: Input: default@tab_date
+PREHOOK: Output: default@tab_date
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 analyze table tab_date compute statistics for columns fl_date
 POSTHOOK: type: ANALYZE_TABLE
+POSTHOOK: Input: default@tab_date
+POSTHOOK: Output: default@tab_date
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
   Stage-1 depends on stages: Stage-0

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/concat_op.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/concat_op.q.out 
b/ql/src/test/results/clientpositive/concat_op.q.out
index 0ad2d6f..b0f9b53 100644
--- a/ql/src/test/results/clientpositive/concat_op.q.out
+++ b/ql/src/test/results/clientpositive/concat_op.q.out
@@ -1,7 +1,11 @@
 PREHOOK: query: explain select key || value from src
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
 POSTHOOK: query: explain select key || value from src
 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
@@ -240,8 +244,12 @@ x2
 x3
 PREHOOK: query: explain select concat('a','b','c')
 PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+#### A masked pattern was here ####
 POSTHOOK: query: explain select concat('a','b','c')
 POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
 
@@ -262,8 +270,12 @@ STAGE PLANS:
 
 PREHOOK: query: explain select 'a' || 'b' || 'c'
 PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+#### A masked pattern was here ####
 POSTHOOK: query: explain select 'a' || 'b' || 'c'
 POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
 

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/constGby.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/constGby.q.out 
b/ql/src/test/results/clientpositive/constGby.q.out
index 2ff81ea..d35ced8 100644
--- a/ql/src/test/results/clientpositive/constGby.q.out
+++ b/ql/src/test/results/clientpositive/constGby.q.out
@@ -26,8 +26,12 @@ POSTHOOK: Output: default@t1_n36
 #### A masked pattern was here ####
 PREHOOK: query: explain select count(1) from t1_n36 group by 1
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n36
+#### A masked pattern was here ####
 POSTHOOK: query: explain select count(1) from t1_n36 group by 1
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n36
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -98,8 +102,12 @@ POSTHOOK: Input: default@t1_n36
 0
 PREHOOK: query: explain select count(*) from t1_n36
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n36
+#### A masked pattern was here ####
 POSTHOOK: query: explain select count(*) from t1_n36
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n36
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
 

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/constantPropWhen.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/constantPropWhen.q.out 
b/ql/src/test/results/clientpositive/constantPropWhen.q.out
index 82fd74f..4e7af0c 100644
--- a/ql/src/test/results/clientpositive/constantPropWhen.q.out
+++ b/ql/src/test/results/clientpositive/constantPropWhen.q.out
@@ -22,8 +22,12 @@ POSTHOOK: Lineage: test_1_n4.id SCRIPT []
 POSTHOOK: Lineage: test_1_n4.id2 SCRIPT []
 PREHOOK: query: explain SELECT cast(CASE WHEN id = id2 THEN FALSE ELSE TRUE 
END AS BOOLEAN) AS b FROM test_1_n4
 PREHOOK: type: QUERY
+PREHOOK: Input: default@test_1_n4
+#### A masked pattern was here ####
 POSTHOOK: query: explain SELECT cast(CASE WHEN id = id2 THEN FALSE ELSE TRUE 
END AS BOOLEAN) AS b FROM test_1_n4
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_1_n4
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -68,8 +72,12 @@ true
 false
 PREHOOK: query: explain SELECT cast(CASE id when id2 THEN FALSE ELSE TRUE END 
AS BOOLEAN) AS b FROM test_1_n4
 PREHOOK: type: QUERY
+PREHOOK: Input: default@test_1_n4
+#### A masked pattern was here ####
 POSTHOOK: query: explain SELECT cast(CASE id when id2 THEN FALSE ELSE TRUE END 
AS BOOLEAN) AS b FROM test_1_n4
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_1_n4
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -114,8 +122,12 @@ true
 false
 PREHOOK: query: explain SELECT cast(CASE WHEN id = id2 THEN TRUE ELSE FALSE 
END AS BOOLEAN) AS b FROM test_1_n4
 PREHOOK: type: QUERY
+PREHOOK: Input: default@test_1_n4
+#### A masked pattern was here ####
 POSTHOOK: query: explain SELECT cast(CASE WHEN id = id2 THEN TRUE ELSE FALSE 
END AS BOOLEAN) AS b FROM test_1_n4
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_1_n4
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -160,8 +172,12 @@ false
 true
 PREHOOK: query: explain SELECT cast(CASE id when id2 THEN TRUE ELSE FALSE END 
AS BOOLEAN) AS b FROM test_1_n4
 PREHOOK: type: QUERY
+PREHOOK: Input: default@test_1_n4
+#### A masked pattern was here ####
 POSTHOOK: query: explain SELECT cast(CASE id when id2 THEN TRUE ELSE FALSE END 
AS BOOLEAN) AS b FROM test_1_n4
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_1_n4
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -206,8 +222,12 @@ false
 true
 PREHOOK: query: explain SELECT cast(CASE WHEN id = id2 THEN FALSE ELSE TRUE 
END AS BOOLEAN) AS b FROM test_1_n4
 PREHOOK: type: QUERY
+PREHOOK: Input: default@test_1_n4
+#### A masked pattern was here ####
 POSTHOOK: query: explain SELECT cast(CASE WHEN id = id2 THEN FALSE ELSE TRUE 
END AS BOOLEAN) AS b FROM test_1_n4
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_1_n4
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -252,8 +272,12 @@ true
 false
 PREHOOK: query: explain SELECT cast(CASE id when id2 THEN FALSE ELSE TRUE END 
AS BOOLEAN) AS b FROM test_1_n4
 PREHOOK: type: QUERY
+PREHOOK: Input: default@test_1_n4
+#### A masked pattern was here ####
 POSTHOOK: query: explain SELECT cast(CASE id when id2 THEN FALSE ELSE TRUE END 
AS BOOLEAN) AS b FROM test_1_n4
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_1_n4
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -298,8 +322,12 @@ true
 false
 PREHOOK: query: explain SELECT cast(CASE WHEN id = id2 THEN TRUE ELSE FALSE 
END AS BOOLEAN) AS b FROM test_1_n4
 PREHOOK: type: QUERY
+PREHOOK: Input: default@test_1_n4
+#### A masked pattern was here ####
 POSTHOOK: query: explain SELECT cast(CASE WHEN id = id2 THEN TRUE ELSE FALSE 
END AS BOOLEAN) AS b FROM test_1_n4
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_1_n4
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -344,8 +372,12 @@ false
 true
 PREHOOK: query: explain SELECT cast(CASE id when id2 THEN TRUE ELSE FALSE END 
AS BOOLEAN) AS b FROM test_1_n4
 PREHOOK: type: QUERY
+PREHOOK: Input: default@test_1_n4
+#### A masked pattern was here ####
 POSTHOOK: query: explain SELECT cast(CASE id when id2 THEN TRUE ELSE FALSE END 
AS BOOLEAN) AS b FROM test_1_n4
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test_1_n4
+#### 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/constantPropagateForSubQuery.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/constantPropagateForSubQuery.q.out 
b/ql/src/test/results/clientpositive/constantPropagateForSubQuery.q.out
index 00f6ce6..8e0839d 100644
--- a/ql/src/test/results/clientpositive/constantPropagateForSubQuery.q.out
+++ b/ql/src/test/results/clientpositive/constantPropagateForSubQuery.q.out
@@ -2,9 +2,15 @@ Warning: Shuffle Join JOIN[7][tables = [$hdt$_0, $hdt$_1]] in 
Stage 'Stage-1:MAP
 PREHOOK: query: explain extended
  select * from (select a.key as ak, a.value as av, b.key as bk, b.value as bv 
from src a join src1 b where a.key = '429' ) c
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: explain extended
  select * from (select a.key as ak, a.value as av, b.key as bk, b.value as bv 
from src a join src1 b where a.key = '429' ) c
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 OPTIMIZED SQL: SELECT CAST('429' AS STRING) AS `ak`, `t0`.`value` AS `av`, 
`t1`.`key` AS `bk`, `t1`.`value` AS `bv`
 FROM (SELECT CAST('429' AS STRING) AS `key`, `value`
 FROM `default`.`src`

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/constant_prop.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/constant_prop.q.out 
b/ql/src/test/results/clientpositive/constant_prop.q.out
index 001a3c8..43dfac8 100644
--- a/ql/src/test/results/clientpositive/constant_prop.q.out
+++ b/ql/src/test/results/clientpositive/constant_prop.q.out
@@ -9,6 +9,8 @@ SELECT NAMED_STRUCT(
        ).F2
        FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT NAMED_STRUCT(
          IF(ARRAY_CONTAINS(ARRAY(1, 2), 3), "F1", "B1"), 1,
@@ -20,6 +22,8 @@ SELECT NAMED_STRUCT(
        ).F2
        FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
 

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/constant_prop_1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/constant_prop_1.q.out 
b/ql/src/test/results/clientpositive/constant_prop_1.q.out
index fc0453f..cd9832a 100644
--- a/ql/src/test/results/clientpositive/constant_prop_1.q.out
+++ b/ql/src/test/results/clientpositive/constant_prop_1.q.out
@@ -3,11 +3,15 @@ select 1 as a from src
 union all
 select 1 as a from src limit 1
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select 1 as a from src
 union all
 select 1 as a from src limit 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
@@ -74,6 +78,8 @@ union all
 select 1 as a from src limit 1
 )sub join src b where value='12345'
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select a, key, value from
 (
@@ -82,6 +88,8 @@ union all
 select 1 as a from src limit 1
 )sub join src b where value='12345'
 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
@@ -183,11 +191,15 @@ select 1 as a from src
 union all
 select 2 as a from src limit 1
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select 1 as a from src
 union all
 select 2 as a from src limit 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
@@ -250,6 +262,8 @@ union all
 select 2 as a from src limit 1
 )sub join src b where value='12345'
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select a, key, value from
 (
@@ -258,6 +272,8 @@ union all
 select 2 as a from src limit 1
 )sub join src b where value='12345'
 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
@@ -365,9 +381,13 @@ Warning: Shuffle Join JOIN[4][tables = [a, b]] in Stage 
'Stage-1:MAPRED' is a cr
 PREHOOK: query: explain
 select a.key, b.value from src a join src b where a.key = '238' and b.value = 
'234'
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select a.key, b.value from src a join src b where a.key = '238' and b.value = 
'234'
 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
@@ -423,9 +443,13 @@ STAGE PLANS:
 PREHOOK: query: explain
 select a.key, b.value from src a join src b on a.key=b.key where b.value = 
'234'
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select a.key, b.value from src a join src b on a.key=b.key where b.value = 
'234'
 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
@@ -508,11 +532,15 @@ select a2 as a3 from
 (select a1 as a2, c1 as c2 from
 (select a as a1, b as b1, c as c1 from t_n26 where a=1 and b=2 and 
c=3)sub1)sub2
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t_n26
+#### A masked pattern was here ####
 POSTHOOK: query: explain 
 select a2 as a3 from
 (select a1 as a2, c1 as c2 from
 (select a as a1, b as b1, c as c1 from t_n26 where a=1 and b=2 and 
c=3)sub1)sub2
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t_n26
+#### 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/constant_prop_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/constant_prop_2.q.out 
b/ql/src/test/results/clientpositive/constant_prop_2.q.out
index cdd3913..469d43a 100644
--- a/ql/src/test/results/clientpositive/constant_prop_2.q.out
+++ b/ql/src/test/results/clientpositive/constant_prop_2.q.out
@@ -1,7 +1,11 @@
 PREHOOK: query: explain select count('1') from src group by '1'
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
 POSTHOOK: query: explain select count('1') from src group by '1'
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
 
@@ -24,9 +28,19 @@ POSTHOOK: Input: default@src
 PREHOOK: query: explain 
 analyze table srcpart partition (ds='2008-04-08',hr=11) compute statistics for 
columns key, value
 PREHOOK: type: ANALYZE_TABLE
+PREHOOK: Input: default@srcpart
+PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
+PREHOOK: Output: default@srcpart
+PREHOOK: Output: default@srcpart@ds=2008-04-08/hr=11
+#### A masked pattern was here ####
 POSTHOOK: query: explain 
 analyze table srcpart partition (ds='2008-04-08',hr=11) compute statistics for 
columns key, value
 POSTHOOK: type: ANALYZE_TABLE
+POSTHOOK: Input: default@srcpart
+POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
+POSTHOOK: Output: default@srcpart
+POSTHOOK: Output: default@srcpart@ds=2008-04-08/hr=11
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
   Stage-1 depends on stages: Stage-0

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/constant_prop_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/constant_prop_3.q.out 
b/ql/src/test/results/clientpositive/constant_prop_3.q.out
index 3ac1991..6d482a5 100644
--- a/ql/src/test/results/clientpositive/constant_prop_3.q.out
+++ b/ql/src/test/results/clientpositive/constant_prop_3.q.out
@@ -126,6 +126,10 @@ order by
        p_type,
        p_size
 PREHOOK: type: QUERY
+PREHOOK: Input: default@part_hive
+PREHOOK: Input: default@partsupp_hive
+PREHOOK: Input: default@supplier_hive
+#### A masked pattern was here ####
 POSTHOOK: query: explain select
        p_brand,
        p_type,
@@ -157,6 +161,10 @@ order by
        p_type,
        p_size
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@part_hive
+POSTHOOK: Input: default@partsupp_hive
+POSTHOOK: Input: default@supplier_hive
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-7

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/constantfolding.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/constantfolding.q.out 
b/ql/src/test/results/clientpositive/constantfolding.q.out
index bc8f191..3a44344 100644
--- a/ql/src/test/results/clientpositive/constantfolding.q.out
+++ b/ql/src/test/results/clientpositive/constantfolding.q.out
@@ -178,8 +178,12 @@ POSTHOOK: Input: default@src
 NULL
 PREHOOK: query: explain select cast("1970-12-31 15:59:58.174" as TIMESTAMP) 
from src
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
 POSTHOOK: query: explain select cast("1970-12-31 15:59:58.174" as TIMESTAMP) 
from src
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
 
@@ -199,8 +203,12 @@ STAGE PLANS:
 
 PREHOOK: query: explain select cast("1970-12-31 15:59:58.174" as DATE) from src
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
 POSTHOOK: query: explain select cast("1970-12-31 15:59:58.174" as DATE) from 
src
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
 
@@ -245,6 +253,8 @@ SELECT ROUND(LN(3.0),12), LN(0.0), LN(-1), 
ROUND(LOG(3.0),12), LOG(0.0),
        POWER(CAST (2 AS DECIMAL), CAST (3 AS INT)), 
        POW(CAST (2 AS DECIMAL), CAST(3 AS INT)) FROM dest1_n127
 PREHOOK: type: QUERY
+PREHOOK: Input: default@dest1_n127
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT ROUND(LN(3.0),12), LN(0.0), LN(-1), ROUND(LOG(3.0),12), LOG(0.0),
        LOG(-1), ROUND(LOG2(3.0),12), LOG2(0.0), LOG2(-1),
@@ -255,6 +265,8 @@ SELECT ROUND(LN(3.0),12), LN(0.0), LN(-1), 
ROUND(LOG(3.0),12), LOG(0.0),
        POWER(CAST (2 AS DECIMAL), CAST (3 AS INT)), 
        POW(CAST (2 AS DECIMAL), CAST(3 AS INT)) FROM dest1_n127
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@dest1_n127
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
 

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/constprog1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/constprog1.q.out 
b/ql/src/test/results/clientpositive/constprog1.q.out
index daca31b..937b9ec 100644
--- a/ql/src/test/results/clientpositive/constprog1.q.out
+++ b/ql/src/test/results/clientpositive/constprog1.q.out
@@ -2,10 +2,14 @@ PREHOOK: query: EXPLAIN
 SELECT IF(INSTR(CONCAT('foo', 'bar'), 'foob') > 0, "F1", "B1")
        FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT IF(INSTR(CONCAT('foo', 'bar'), 'foob') > 0, "F1", "B1")
        FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
 

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/constprog2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/constprog2.q.out 
b/ql/src/test/results/clientpositive/constprog2.q.out
index c9e9d93..0dc6dd8 100644
--- a/ql/src/test/results/clientpositive/constprog2.q.out
+++ b/ql/src/test/results/clientpositive/constprog2.q.out
@@ -3,10 +3,14 @@ PREHOOK: query: EXPLAIN
 SELECT src1.key, src1.key + 1, src2.value
        FROM srcbucket src1 join srcbucket src2 ON src1.key = src2.key AND 
src1.key = 86
 PREHOOK: type: QUERY
+PREHOOK: Input: default@srcbucket
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT src1.key, src1.key + 1, src2.value
        FROM srcbucket src1 join srcbucket src2 ON src1.key = src2.key AND 
src1.key = 86
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@srcbucket
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -72,10 +76,14 @@ PREHOOK: query: EXPLAIN
 SELECT src1.key, src1.key + 1, src2.value
        FROM srcbucket src1 join srcbucket src2 ON src1.key = src2.key AND 
cast(src1.key as double) = 86
 PREHOOK: type: QUERY
+PREHOOK: Input: default@srcbucket
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT src1.key, src1.key + 1, src2.value
        FROM srcbucket src1 join srcbucket src2 ON src1.key = src2.key AND 
cast(src1.key as double) = 86
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@srcbucket
+#### 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/constprog3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/constprog3.q.out 
b/ql/src/test/results/clientpositive/constprog3.q.out
index 9fc06d6..80f0e11 100644
--- a/ql/src/test/results/clientpositive/constprog3.q.out
+++ b/ql/src/test/results/clientpositive/constprog3.q.out
@@ -20,11 +20,17 @@ select table1.id, table1.val, table1.val1
 from table1 inner join table3
 on table1.dimid = table3.id and table3.id = 1 where table1.dimid <> 1
 PREHOOK: type: QUERY
+PREHOOK: Input: default@table1
+PREHOOK: Input: default@table3
+#### A masked pattern was here ####
 POSTHOOK: query: explain
 select table1.id, table1.val, table1.val1
 from table1 inner join table3
 on table1.dimid = table3.id and table3.id = 1 where table1.dimid <> 1
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@table1
+POSTHOOK: Input: default@table3
+#### 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/constprog_dp.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/constprog_dp.q.out 
b/ql/src/test/results/clientpositive/constprog_dp.q.out
index b5143a7..adbe0df 100644
--- a/ql/src/test/results/clientpositive/constprog_dp.q.out
+++ b/ql/src/test/results/clientpositive/constprog_dp.q.out
@@ -10,10 +10,17 @@ PREHOOK: query: EXPLAIN
 from srcpart
 insert overwrite table dest_n1 partition (ds) select key, value, ds where 
ds='2008-04-08'
 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@dest_n1
 POSTHOOK: query: EXPLAIN
 from srcpart
 insert overwrite table dest_n1 partition (ds) select key, value, ds where 
ds='2008-04-08'
 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
 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/constprog_partitioner.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/constprog_partitioner.q.out 
b/ql/src/test/results/clientpositive/constprog_partitioner.q.out
index f4f2e22..ef4e215 100644
--- a/ql/src/test/results/clientpositive/constprog_partitioner.q.out
+++ b/ql/src/test/results/clientpositive/constprog_partitioner.q.out
@@ -3,10 +3,14 @@ PREHOOK: query: EXPLAIN
 SELECT src1.key, src1.key + 1, src2.value
        FROM srcbucket src1 join srcbucket src2 ON src1.key = src2.key AND 
src1.key = 100
 PREHOOK: type: QUERY
+PREHOOK: Input: default@srcbucket
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT src1.key, src1.key + 1, src2.value
        FROM srcbucket src1 join srcbucket src2 ON src1.key = src2.key AND 
src1.key = 100
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@srcbucket
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -73,12 +77,16 @@ FROM lineitem li
 WHERE li.l_linenumber = 1 AND
  li.l_orderkey IN (SELECT l_orderkey FROM lineitem WHERE l_shipmode = 'AIR' 
AND l_linenumber = li.l_linenumber)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@lineitem
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT l_partkey, l_suppkey
 FROM lineitem li
 WHERE li.l_linenumber = 1 AND
  li.l_orderkey IN (SELECT l_orderkey FROM lineitem WHERE l_shipmode = 'AIR' 
AND l_linenumber = li.l_linenumber)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@lineitem
+#### 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/constprog_type.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/constprog_type.q.out 
b/ql/src/test/results/clientpositive/constprog_type.q.out
index a3f6358..f5e5179 100644
--- a/ql/src/test/results/clientpositive/constprog_type.q.out
+++ b/ql/src/test/results/clientpositive/constprog_type.q.out
@@ -11,11 +11,15 @@ INSERT OVERWRITE TABLE dest1_n26
 SELECT cast('2013-11-17' as date), cast(cast('1.3041352164485E9' as double) as 
timestamp)
        FROM src tablesample (1 rows)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@dest1_n26
 POSTHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE dest1_n26
 SELECT cast('2013-11-17' as date), cast(cast('1.3041352164485E9' as double) as 
timestamp)
        FROM src tablesample (1 rows)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@dest1_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/constprog_when_case.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/constprog_when_case.q.out 
b/ql/src/test/results/clientpositive/constprog_when_case.q.out
index 4d2214a..d237f13 100644
--- a/ql/src/test/results/clientpositive/constprog_when_case.q.out
+++ b/ql/src/test/results/clientpositive/constprog_when_case.q.out
@@ -32,8 +32,12 @@ POSTHOOK: Lineage: src_orc.key1 SIMPLE 
[(src)src.FieldSchema(name:value, type:st
 POSTHOOK: Lineage: src_orc.key2 SIMPLE [(src)src.FieldSchema(name:key, 
type:string, comment:default), ]
 PREHOOK: query: explain SELECT IF ( ( (CASE WHEN bool0 THEN 1 WHEN NOT bool0 
THEN 0 END) = (CASE WHEN TRUE THEN 1 WHEN NOT TRUE THEN 0 END) ), key0, IF ( ( 
(CASE WHEN bool0 THEN 1 WHEN NOT bool0 THEN 0 END) = (CASE WHEN FALSE THEN 1 
WHEN NOT FALSE THEN 0 END) ), key1, key2 ) ) FROM src_orc
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src_orc
+#### A masked pattern was here ####
 POSTHOOK: query: explain SELECT IF ( ( (CASE WHEN bool0 THEN 1 WHEN NOT bool0 
THEN 0 END) = (CASE WHEN TRUE THEN 1 WHEN NOT TRUE THEN 0 END) ), key0, IF ( ( 
(CASE WHEN bool0 THEN 1 WHEN NOT bool0 THEN 0 END) = (CASE WHEN FALSE THEN 1 
WHEN NOT FALSE THEN 0 END) ), key1, key2 ) ) FROM src_orc
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src_orc
+#### 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/convert_decimal64_to_decimal.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/convert_decimal64_to_decimal.q.out 
b/ql/src/test/results/clientpositive/convert_decimal64_to_decimal.q.out
index 31e4dd3..1fc892a 100644
--- a/ql/src/test/results/clientpositive/convert_decimal64_to_decimal.q.out
+++ b/ql/src/test/results/clientpositive/convert_decimal64_to_decimal.q.out
@@ -131,8 +131,14 @@ POSTHOOK: Input: default@table_19
 POSTHOOK: Output: default@table_19
 PREHOOK: query: EXPLAIN VECTORIZATION DETAIL SELECT count(t2.smallint_col_15) 
FROM   table_19 t1  INNER JOIN table_8 t2 ON t2.decimal0402_col_20 = 
t1.decimal0801_col_4
 PREHOOK: type: QUERY
+PREHOOK: Input: default@table_19
+PREHOOK: Input: default@table_8
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN VECTORIZATION DETAIL SELECT count(t2.smallint_col_15) 
FROM   table_19 t1  INNER JOIN table_8 t2 ON t2.decimal0402_col_20 = 
t1.decimal0801_col_4
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@table_19
+POSTHOOK: Input: default@table_8
+#### A masked pattern was here ####
 PLAN VECTORIZATION:
   enabled: true
   enabledConditionsMet: [hive.vectorized.execution.enabled IS true]
@@ -282,8 +288,14 @@ POSTHOOK: Input: default@table_8
 2
 PREHOOK: query: EXPLAIN VECTORIZATION DETAIL SELECT count(t2.smallint_col_15) 
FROM   table_19 t1  INNER JOIN table_8 t2 ON t2.decimal0402_col_20 = 
t1.decimal0801_col_4
 PREHOOK: type: QUERY
+PREHOOK: Input: default@table_19
+PREHOOK: Input: default@table_8
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN VECTORIZATION DETAIL SELECT count(t2.smallint_col_15) 
FROM   table_19 t1  INNER JOIN table_8 t2 ON t2.decimal0402_col_20 = 
t1.decimal0801_col_4
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@table_19
+POSTHOOK: Input: default@table_8
+#### A masked pattern was here ####
 PLAN VECTORIZATION:
   enabled: true
   enabledConditionsMet: [hive.vectorized.execution.enabled IS true]

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/correlated_join_keys.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/correlated_join_keys.q.out 
b/ql/src/test/results/clientpositive/correlated_join_keys.q.out
index 3c0e6e8..959f80a 100644
--- a/ql/src/test/results/clientpositive/correlated_join_keys.q.out
+++ b/ql/src/test/results/clientpositive/correlated_join_keys.q.out
@@ -70,8 +70,12 @@ POSTHOOK: Output: default@customer_address_n0
 #### A masked pattern was here ####
 PREHOOK: query: explain select count(*) from customer_address_n0 a join 
customer_address_n0 b on (a.ca_zip = b.ca_zip and a.ca_state = b.ca_state)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@customer_address_n0
+#### A masked pattern was here ####
 POSTHOOK: query: explain select count(*) from customer_address_n0 a join 
customer_address_n0 b on (a.ca_zip = b.ca_zip and a.ca_state = b.ca_state)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@customer_address_n0
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1
@@ -162,8 +166,12 @@ STAGE PLANS:
 
 PREHOOK: query: explain select count(*) from customer_address_n0 a join 
customer_address_n0 b on (a.ca_zip = b.ca_zip and a.ca_state = b.ca_state)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@customer_address_n0
+#### A masked pattern was here ####
 POSTHOOK: query: explain select count(*) from customer_address_n0 a join 
customer_address_n0 b on (a.ca_zip = b.ca_zip and a.ca_state = b.ca_state)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@customer_address_n0
+#### 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/correlationoptimizer10.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/correlationoptimizer10.q.out 
b/ql/src/test/results/clientpositive/correlationoptimizer10.q.out
index f8e07a6..7605ef0 100644
--- a/ql/src/test/results/clientpositive/correlationoptimizer10.q.out
+++ b/ql/src/test/results/clientpositive/correlationoptimizer10.q.out
@@ -5,6 +5,9 @@ FROM
 LEFT SEMI JOIN src yy
 ON xx.key=yy.key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key, xx.cnt
 FROM
@@ -12,6 +15,9 @@ FROM
 LEFT SEMI JOIN src yy
 ON xx.key=yy.key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1
@@ -193,6 +199,9 @@ FROM
 LEFT SEMI JOIN src yy
 ON xx.key=yy.key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key, xx.cnt
 FROM
@@ -200,6 +209,9 @@ FROM
 LEFT SEMI JOIN src yy
 ON xx.key=yy.key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -363,6 +375,9 @@ LEFT SEMI JOIN
        y.key > 20) yy
 ON xx.key=yy.key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key, xx.value
 FROM
@@ -374,6 +389,9 @@ LEFT SEMI JOIN
        y.key > 20) yy
 ON xx.key=yy.key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-2 is a root stage
   Stage-1 depends on stages: Stage-2
@@ -525,6 +543,9 @@ LEFT SEMI JOIN
        y.key > 20) yy
 ON xx.key=yy.key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key, xx.value
 FROM
@@ -536,6 +557,9 @@ LEFT SEMI JOIN
        y.key > 20) yy
 ON xx.key=yy.key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -684,6 +708,8 @@ LEFT SEMI JOIN
  WHERE x.key < 200 AND x.key > 180) yy
 ON xx.key=yy.key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key, xx.value
 FROM
@@ -694,6 +720,8 @@ LEFT SEMI JOIN
  WHERE x.key < 200 AND x.key > 180) yy
 ON xx.key=yy.key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-2 is a root stage
   Stage-1 depends on stages: Stage-2
@@ -858,6 +886,8 @@ LEFT SEMI JOIN
  WHERE x.key < 200 AND x.key > 180) yy
 ON xx.key=yy.key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key, xx.value
 FROM
@@ -868,6 +898,8 @@ LEFT SEMI JOIN
  WHERE x.key < 200 AND x.key > 180) yy
 ON xx.key=yy.key
 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

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/correlationoptimizer11.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/correlationoptimizer11.q.out 
b/ql/src/test/results/clientpositive/correlationoptimizer11.q.out
index 57db64a..1f34fcf 100644
--- a/ql/src/test/results/clientpositive/correlationoptimizer11.q.out
+++ b/ql/src/test/results/clientpositive/correlationoptimizer11.q.out
@@ -37,6 +37,10 @@ WHERE x.partitionId = 1 AND
       y.partitionId = 2
 GROUP BY x.key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@part_table_n1
+PREHOOK: Input: default@part_table_n1@partitionid=1
+PREHOOK: Input: default@part_table_n1@partitionid=2
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT x.key AS key, count(1) AS cnt
 FROM part_table_n1 x JOIN part_table_n1 y ON (x.key = y.key)
@@ -44,6 +48,10 @@ WHERE x.partitionId = 1 AND
       y.partitionId = 2
 GROUP BY x.key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@part_table_n1
+POSTHOOK: Input: default@part_table_n1@partitionid=1
+POSTHOOK: Input: default@part_table_n1@partitionid=2
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1
@@ -167,6 +175,10 @@ WHERE x.partitionId = 1 AND
       y.partitionId = 2
 GROUP BY x.key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@part_table_n1
+PREHOOK: Input: default@part_table_n1@partitionid=1
+PREHOOK: Input: default@part_table_n1@partitionid=2
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT x.key AS key, count(1) AS cnt
 FROM part_table_n1 x JOIN part_table_n1 y ON (x.key = y.key)
@@ -174,6 +186,10 @@ WHERE x.partitionId = 1 AND
       y.partitionId = 2
 GROUP BY x.key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@part_table_n1
+POSTHOOK: Input: default@part_table_n1@partitionid=1
+POSTHOOK: Input: default@part_table_n1@partitionid=2
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -275,6 +291,9 @@ WHERE x.partitionId = 2 AND
       y.partitionId = 2
 GROUP BY x.key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@part_table_n1
+PREHOOK: Input: default@part_table_n1@partitionid=2
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT x.key AS key, count(1) AS cnt
 FROM part_table_n1 x JOIN part_table_n1 y ON (x.key = y.key)
@@ -282,6 +301,9 @@ WHERE x.partitionId = 2 AND
       y.partitionId = 2
 GROUP BY x.key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@part_table_n1
+POSTHOOK: Input: default@part_table_n1@partitionid=2
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1
@@ -416,6 +438,9 @@ WHERE x.partitionId = 2 AND
       y.partitionId = 2
 GROUP BY x.key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@part_table_n1
+PREHOOK: Input: default@part_table_n1@partitionid=2
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT x.key AS key, count(1) AS cnt
 FROM part_table_n1 x JOIN part_table_n1 y ON (x.key = y.key)
@@ -423,6 +448,9 @@ WHERE x.partitionId = 2 AND
       y.partitionId = 2
 GROUP BY x.key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@part_table_n1
+POSTHOOK: Input: default@part_table_n1@partitionid=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/correlationoptimizer12.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/correlationoptimizer12.q.out 
b/ql/src/test/results/clientpositive/correlationoptimizer12.q.out
index d62fae3..a5ee7cb 100644
--- a/ql/src/test/results/clientpositive/correlationoptimizer12.q.out
+++ b/ql/src/test/results/clientpositive/correlationoptimizer12.q.out
@@ -5,6 +5,9 @@ JOIN
 (SELECT y.key as key, count(y.value) OVER (PARTITION BY y.key) AS cnt FROM 
src1 y) yy
 ON (xx.key=yy.key)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN SELECT xx.key, xx.cnt, yy.key, yy.cnt
 FROM
 (SELECT x.key as key, count(x.value) OVER (PARTITION BY x.key) AS cnt FROM src 
x) xx
@@ -12,6 +15,9 @@ JOIN
 (SELECT y.key as key, count(y.value) OVER (PARTITION BY y.key) AS cnt FROM 
src1 y) yy
 ON (xx.key=yy.key)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/correlationoptimizer13.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/correlationoptimizer13.q.out 
b/ql/src/test/results/clientpositive/correlationoptimizer13.q.out
index de456fe..a94d62b 100644
--- a/ql/src/test/results/clientpositive/correlationoptimizer13.q.out
+++ b/ql/src/test/results/clientpositive/correlationoptimizer13.q.out
@@ -28,6 +28,8 @@ JOIN
 (SELECT x1.c1 AS key1, x1.c3 AS key2, count(1) AS cnt FROM tmp x1 WHERE x1.c2 
> 100 GROUP BY x1.c3, x1.c1) yy
 ON (xx.key1 = yy.key1 AND xx.key2 == yy.key2) ORDER BY xx.key1, xx.key2, 
yy.key1, yy.key2, xx.cnt, yy.cnt
 PREHOOK: type: QUERY
+PREHOOK: Input: default@tmp
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key1, xx.key2, yy.key1, yy.key2, xx.cnt, yy.cnt
 FROM 
@@ -36,6 +38,8 @@ JOIN
 (SELECT x1.c1 AS key1, x1.c3 AS key2, count(1) AS cnt FROM tmp x1 WHERE x1.c2 
> 100 GROUP BY x1.c3, x1.c1) yy
 ON (xx.key1 = yy.key1 AND xx.key2 == yy.key2) ORDER BY xx.key1, xx.key2, 
yy.key1, yy.key2, xx.cnt, yy.cnt
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@tmp
+#### 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/correlationoptimizer14.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/correlationoptimizer14.q.out 
b/ql/src/test/results/clientpositive/correlationoptimizer14.q.out
index c4a7dcb..8ced6f3 100644
--- a/ql/src/test/results/clientpositive/correlationoptimizer14.q.out
+++ b/ql/src/test/results/clientpositive/correlationoptimizer14.q.out
@@ -6,6 +6,9 @@ JOIN
 (SELECT y.key as key, y.value as value FROM src1 y DISTRIBUTE BY key) yy
 ON (xx.key=yy.key)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key, xx.value, yy.key, yy.value
 FROM
@@ -14,6 +17,9 @@ JOIN
 (SELECT y.key as key, y.value as value FROM src1 y DISTRIBUTE BY key) yy
 ON (xx.key=yy.key)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3
@@ -131,6 +137,9 @@ JOIN
 (SELECT y.key as key, y.value as value FROM src1 y SORT BY key) yy
 ON (xx.key=yy.key)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key, xx.value, yy.key, yy.value
 FROM
@@ -139,6 +148,9 @@ JOIN
 (SELECT y.key as key, y.value as value FROM src1 y SORT BY key) yy
 ON (xx.key=yy.key)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3
@@ -256,6 +268,9 @@ JOIN
 (SELECT y.key as key, y.value as value FROM src1 y DISTRIBUTE BY key SORT BY 
key) yy
 ON (xx.key=yy.key)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key, xx.value, yy.key, yy.value
 FROM
@@ -264,6 +279,9 @@ JOIN
 (SELECT y.key as key, y.value as value FROM src1 y DISTRIBUTE BY key SORT BY 
key) yy
 ON (xx.key=yy.key)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3
@@ -440,6 +458,9 @@ JOIN
 (SELECT y.key as key, y.value as value FROM src1 y DISTRIBUTE BY key SORT BY 
key) yy
 ON (xx.key=yy.key)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key, xx.value, yy.key, yy.value
 FROM
@@ -448,6 +469,9 @@ JOIN
 (SELECT y.key as key, y.value as value FROM src1 y DISTRIBUTE BY key SORT BY 
key) yy
 ON (xx.key=yy.key)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -605,6 +629,9 @@ JOIN
 (SELECT y.key as key, y.value as value FROM src1 y DISTRIBUTE BY key SORT BY 
key DESC) yy
 ON (xx.key=yy.key)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key, xx.value, yy.key, yy.value
 FROM
@@ -613,6 +640,9 @@ JOIN
 (SELECT y.key as key, y.value as value FROM src1 y DISTRIBUTE BY key SORT BY 
key DESC) yy
 ON (xx.key=yy.key)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3
@@ -732,6 +762,9 @@ JOIN
 (SELECT y.key as key, y.value as value FROM src1 y ORDER BY key) yy
 ON (xx.key=yy.key)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key, xx.value, yy.key, yy.value
 FROM
@@ -740,6 +773,9 @@ JOIN
 (SELECT y.key as key, y.value as value FROM src1 y ORDER BY key) yy
 ON (xx.key=yy.key)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3
@@ -857,6 +893,9 @@ JOIN
 (SELECT y.key as key, y.value as value FROM src1 y Cluster BY key) yy
 ON (xx.key=yy.key)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key, xx.value, yy.key, yy.value
 FROM
@@ -865,6 +904,9 @@ JOIN
 (SELECT y.key as key, y.value as value FROM src1 y Cluster BY key) yy
 ON (xx.key=yy.key)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3
@@ -1041,6 +1083,9 @@ JOIN
 (SELECT y.key as key, y.value as value FROM src1 y Cluster BY key) yy
 ON (xx.key=yy.key)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key, xx.value, yy.key, yy.value
 FROM
@@ -1049,6 +1094,9 @@ JOIN
 (SELECT y.key as key, y.value as value FROM src1 y Cluster BY key) yy
 ON (xx.key=yy.key)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -1206,6 +1254,9 @@ JOIN
 (SELECT y.key as key, count(*) as value FROM src1 y GROUP BY y.key ORDER BY 
key) yy
 ON (xx.key=yy.key)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key, xx.value, yy.key, yy.value
 FROM
@@ -1214,6 +1265,9 @@ JOIN
 (SELECT y.key as key, count(*) as value FROM src1 y GROUP BY y.key ORDER BY 
key) yy
 ON (xx.key=yy.key)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3
@@ -1394,6 +1448,9 @@ JOIN
 (SELECT y.key as key, count(*) as value FROM src1 y GROUP BY y.key ORDER BY 
key) yy
 ON (xx.key=yy.key)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key, xx.value, yy.key, yy.value
 FROM
@@ -1402,6 +1459,9 @@ JOIN
 (SELECT y.key as key, count(*) as value FROM src1 y GROUP BY y.key ORDER BY 
key) yy
 ON (xx.key=yy.key)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### 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/correlationoptimizer15.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/correlationoptimizer15.q.out 
b/ql/src/test/results/clientpositive/correlationoptimizer15.q.out
index ffa3a28..f1b49ba 100644
--- a/ql/src/test/results/clientpositive/correlationoptimizer15.q.out
+++ b/ql/src/test/results/clientpositive/correlationoptimizer15.q.out
@@ -5,6 +5,9 @@ FROM
 JOIN src yy
 ON xx.key=yy.key ORDER BY xx.key, xx.cnt, yy.key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key, xx.cnt, yy.key
 FROM
@@ -12,6 +15,9 @@ FROM
 JOIN src yy
 ON xx.key=yy.key ORDER BY xx.key, xx.cnt, yy.key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1
@@ -231,6 +237,9 @@ FROM
 JOIN src yy
 ON xx.key=yy.key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key, xx.cnt, yy.key
 FROM
@@ -238,6 +247,9 @@ FROM
 JOIN src yy
 ON xx.key=yy.key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### 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/correlationoptimizer5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/correlationoptimizer5.q.out 
b/ql/src/test/results/clientpositive/correlationoptimizer5.q.out
index 5fb6c13..ab85399 100644
--- a/ql/src/test/results/clientpositive/correlationoptimizer5.q.out
+++ b/ql/src/test/results/clientpositive/correlationoptimizer5.q.out
@@ -95,6 +95,11 @@ JOIN
 (SELECT m.key, n.val FROM T3_n5 m JOIN T4_n1 n ON (m.key = n.key)) d
 ON b.key = d.key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n19
+PREHOOK: Input: default@t2_n11
+PREHOOK: Input: default@t3_n5
+PREHOOK: Input: default@t4_n1
+PREHOOK: Output: default@dest_co1
 POSTHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE dest_co1
 SELECT b.key, d.val
@@ -104,6 +109,11 @@ JOIN
 (SELECT m.key, n.val FROM T3_n5 m JOIN T4_n1 n ON (m.key = n.key)) d
 ON b.key = d.key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n19
+POSTHOOK: Input: default@t2_n11
+POSTHOOK: Input: default@t3_n5
+POSTHOOK: Input: default@t4_n1
+POSTHOOK: Output: default@dest_co1
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-5
@@ -304,6 +314,11 @@ JOIN
 (SELECT m.key, n.val FROM T3_n5 m JOIN T4_n1 n ON (m.key = n.key)) d
 ON b.key = d.key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n19
+PREHOOK: Input: default@t2_n11
+PREHOOK: Input: default@t3_n5
+PREHOOK: Input: default@t4_n1
+PREHOOK: Output: default@dest_co2
 POSTHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE dest_co2
 SELECT b.key, d.val
@@ -313,6 +328,11 @@ JOIN
 (SELECT m.key, n.val FROM T3_n5 m JOIN T4_n1 n ON (m.key = n.key)) d
 ON b.key = d.key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n19
+POSTHOOK: Input: default@t2_n11
+POSTHOOK: Input: default@t3_n5
+POSTHOOK: Input: default@t4_n1
+POSTHOOK: Output: default@dest_co2
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -502,6 +522,11 @@ JOIN
 (SELECT m.key, n.val FROM T3_n5 m JOIN T4_n1 n ON (m.key = n.key)) d
 ON b.key = d.key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@t1_n19
+PREHOOK: Input: default@t2_n11
+PREHOOK: Input: default@t3_n5
+PREHOOK: Input: default@t4_n1
+PREHOOK: Output: default@dest_co3
 POSTHOOK: query: EXPLAIN
 INSERT OVERWRITE TABLE dest_co3
 SELECT b.key, d.val
@@ -511,6 +536,11 @@ JOIN
 (SELECT m.key, n.val FROM T3_n5 m JOIN T4_n1 n ON (m.key = n.key)) d
 ON b.key = d.key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t1_n19
+POSTHOOK: Input: default@t2_n11
+POSTHOOK: Input: default@t3_n5
+POSTHOOK: Input: default@t4_n1
+POSTHOOK: Output: default@dest_co3
 STAGE DEPENDENCIES:
   Stage-14 is a root stage
   Stage-10 depends on stages: Stage-14

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/correlationoptimizer7.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/correlationoptimizer7.q.out 
b/ql/src/test/results/clientpositive/correlationoptimizer7.q.out
index bfb31e0..eb99ee7 100644
--- a/ql/src/test/results/clientpositive/correlationoptimizer7.q.out
+++ b/ql/src/test/results/clientpositive/correlationoptimizer7.q.out
@@ -6,6 +6,9 @@ FROM (SELECT x.key AS key, count(1) AS cnt
 JOIN src1 yy
 ON xx.key=yy.key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key, xx.cnt, yy.key, yy.value
 FROM (SELECT x.key AS key, count(1) AS cnt
@@ -14,6 +17,9 @@ FROM (SELECT x.key AS key, count(1) AS cnt
 JOIN src1 yy
 ON xx.key=yy.key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-9 is a root stage
   Stage-2 depends on stages: Stage-9
@@ -190,6 +196,9 @@ FROM (SELECT x.key AS key, count(1) AS cnt
 JOIN src1 yy
 ON xx.key=yy.key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key, xx.cnt, yy.key, yy.value
 FROM (SELECT x.key AS key, count(1) AS cnt
@@ -198,6 +207,9 @@ FROM (SELECT x.key AS key, count(1) AS cnt
 JOIN src1 yy
 ON xx.key=yy.key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-6 is a root stage
   Stage-2 depends on stages: Stage-6
@@ -371,6 +383,9 @@ FROM (SELECT x.key AS key, count(1) AS cnt
 JOIN src1 yy
 ON xx.key=yy.key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key, xx.cnt, yy.key, yy.value
 FROM (SELECT x.key AS key, count(1) AS cnt
@@ -379,6 +394,9 @@ FROM (SELECT x.key AS key, count(1) AS cnt
 JOIN src1 yy
 ON xx.key=yy.key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-9 is a root stage
   Stage-2 depends on stages: Stage-9
@@ -555,6 +573,9 @@ FROM (SELECT x.key AS key, count(1) AS cnt
 JOIN src1 yy
 ON xx.key=yy.key
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key, xx.cnt, yy.key, yy.value
 FROM (SELECT x.key AS key, count(1) AS cnt
@@ -563,6 +584,9 @@ FROM (SELECT x.key AS key, count(1) AS cnt
 JOIN src1 yy
 ON xx.key=yy.key
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-6 is a root stage
   Stage-2 depends on stages: Stage-6

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/correlationoptimizer8.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/correlationoptimizer8.q.out 
b/ql/src/test/results/clientpositive/correlationoptimizer8.q.out
index 9aba806..1080706 100644
--- a/ql/src/test/results/clientpositive/correlationoptimizer8.q.out
+++ b/ql/src/test/results/clientpositive/correlationoptimizer8.q.out
@@ -7,6 +7,9 @@ FROM
 ) subq1
 JOIN src1 x ON (x.key = subq1.key)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT x.key, x.value, subq1.cnt
 FROM 
@@ -16,6 +19,9 @@ FROM
 ) subq1
 JOIN src1 x ON (x.key = subq1.key)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3
@@ -203,6 +209,9 @@ FROM
 ) subq1
 JOIN src1 x ON (x.key = subq1.key)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT x.key, x.value, subq1.cnt
 FROM 
@@ -212,6 +221,9 @@ FROM
 ) subq1
 JOIN src1 x ON (x.key = subq1.key)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -405,6 +417,9 @@ FROM
 ) subq1
 LEFT OUTER JOIN src1 x ON (x.key = subq1.key)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT subq1.key, subq1.cnt, x.key, x.value
 FROM 
@@ -414,6 +429,9 @@ FROM
 ) subq1
 LEFT OUTER JOIN src1 x ON (x.key = subq1.key)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3
@@ -618,6 +636,9 @@ FROM
 ) subq1
 LEFT OUTER JOIN src1 x ON (x.key = subq1.key)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT subq1.key, subq1.cnt, x.key, x.value
 FROM 
@@ -627,6 +648,9 @@ FROM
 ) subq1
 LEFT OUTER JOIN src1 x ON (x.key = subq1.key)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -829,6 +853,9 @@ FROM
 ) subq1
 JOIN src1 x ON (x.key = subq1.key)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT x.key, x.value, subq1.cnt
 FROM 
@@ -838,6 +865,9 @@ FROM
 ) subq1
 JOIN src1 x ON (x.key = subq1.key)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3
@@ -995,6 +1025,9 @@ FROM
 ) subq1
 FULL OUTER JOIN src1 x ON (x.key = subq1.key)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Input: default@src1
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT subq1.key, subq1.value, x.key, x.value
 FROM 
@@ -1004,6 +1037,9 @@ FROM
 ) subq1
 FULL OUTER JOIN src1 x ON (x.key = subq1.key)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Input: default@src1
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3

http://git-wip-us.apache.org/repos/asf/hive/blob/b356aae0/ql/src/test/results/clientpositive/correlationoptimizer9.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/correlationoptimizer9.q.out 
b/ql/src/test/results/clientpositive/correlationoptimizer9.q.out
index 69d30c1..13ebedb 100644
--- a/ql/src/test/results/clientpositive/correlationoptimizer9.q.out
+++ b/ql/src/test/results/clientpositive/correlationoptimizer9.q.out
@@ -28,6 +28,8 @@ JOIN
 (SELECT x1.c2 AS key, count(1) AS cnt FROM tmp_n2 x1 WHERE x1.c2 > 100 GROUP 
BY x1.c2) yy
 ON (xx.key = yy.key)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@tmp_n2
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key, yy.key, xx.cnt, yy.cnt
 FROM 
@@ -36,6 +38,8 @@ JOIN
 (SELECT x1.c2 AS key, count(1) AS cnt FROM tmp_n2 x1 WHERE x1.c2 > 100 GROUP 
BY x1.c2) yy
 ON (xx.key = yy.key)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@tmp_n2
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3
@@ -194,6 +198,8 @@ JOIN
 (SELECT x1.c2 AS key, count(1) AS cnt FROM tmp_n2 x1 WHERE x1.c2 > 100 GROUP 
BY x1.c2) yy
 ON (xx.key = yy.key)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@tmp_n2
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key, yy.key, xx.cnt, yy.cnt
 FROM 
@@ -202,6 +208,8 @@ JOIN
 (SELECT x1.c2 AS key, count(1) AS cnt FROM tmp_n2 x1 WHERE x1.c2 > 100 GROUP 
BY x1.c2) yy
 ON (xx.key = yy.key)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@tmp_n2
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -345,6 +353,8 @@ JOIN
 (SELECT x1.c1 AS key1, x1.c3 AS key2, count(1) AS cnt FROM tmp_n2 x1 WHERE 
x1.c2 > 100 GROUP BY x1.c1, x1.c3) yy
 ON (xx.key1 = yy.key1 AND xx.key2 == yy.key2)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@tmp_n2
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key1, xx.key2, yy.key1, yy.key2, xx.cnt, yy.cnt
 FROM 
@@ -353,6 +363,8 @@ JOIN
 (SELECT x1.c1 AS key1, x1.c3 AS key2, count(1) AS cnt FROM tmp_n2 x1 WHERE 
x1.c2 > 100 GROUP BY x1.c1, x1.c3) yy
 ON (xx.key1 = yy.key1 AND xx.key2 == yy.key2)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@tmp_n2
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-2 depends on stages: Stage-1, Stage-3
@@ -515,6 +527,8 @@ JOIN
 (SELECT x1.c1 AS key1, x1.c3 AS key2, count(1) AS cnt FROM tmp_n2 x1 WHERE 
x1.c2 > 100 GROUP BY x1.c1, x1.c3) yy
 ON (xx.key1 = yy.key1 AND xx.key2 == yy.key2)
 PREHOOK: type: QUERY
+PREHOOK: Input: default@tmp_n2
+#### A masked pattern was here ####
 POSTHOOK: query: EXPLAIN
 SELECT xx.key1, xx.key2, yy.key1, yy.key2, xx.cnt, yy.cnt
 FROM 
@@ -523,6 +537,8 @@ JOIN
 (SELECT x1.c1 AS key1, x1.c3 AS key2, count(1) AS cnt FROM tmp_n2 x1 WHERE 
x1.c2 > 100 GROUP BY x1.c1, x1.c3) yy
 ON (xx.key1 = yy.key1 AND xx.key2 == yy.key2)
 POSTHOOK: type: QUERY
+POSTHOOK: Input: default@tmp_n2
+#### A masked pattern was here ####
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1

Reply via email to