http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/annotate_stats_join_pkfk.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/annotate_stats_join_pkfk.q 
b/ql/src/test/queries/clientpositive/annotate_stats_join_pkfk.q
index f94994a..72ebb17 100644
--- a/ql/src/test/queries/clientpositive/annotate_stats_join_pkfk.q
+++ b/ql/src/test/queries/clientpositive/annotate_stats_join_pkfk.q
@@ -1,13 +1,13 @@
 set hive.stats.fetch.column.stats=true;
 
-drop table store_sales;
-drop table store;
+drop table store_sales_n0;
+drop table store_n0;
 drop table customer_address;
 
 -- s_store_sk is PK, ss_store_sk is FK
 -- ca_address_sk is PK, ss_addr_sk is FK
 
-create table store_sales
+create table store_sales_n0
 (
     ss_sold_date_sk           int,
     ss_sold_time_sk           int,
@@ -35,7 +35,7 @@ create table store_sales
 )
 row format delimited fields terminated by '|';
 
-create table store
+create table store_n0
 (
     s_store_sk                int,
     s_store_id                string,
@@ -121,44 +121,44 @@ create table customer_address
 )
 row format delimited fields terminated by '|';
 
-load data local inpath '../../data/files/store.txt' overwrite into table store;
+load data local inpath '../../data/files/store.txt' overwrite into table 
store_n0;
 load data local inpath '../../data/files/store.txt' overwrite into table 
store_bigint;
-load data local inpath '../../data/files/store_sales.txt' overwrite into table 
store_sales;
+load data local inpath '../../data/files/store_sales.txt' overwrite into table 
store_sales_n0;
 load data local inpath '../../data/files/customer_address.txt' overwrite into 
table customer_address;
 
-analyze table store compute statistics;
-analyze table store compute statistics for columns s_store_sk, s_floor_space;
+analyze table store_n0 compute statistics;
+analyze table store_n0 compute statistics for columns s_store_sk, 
s_floor_space;
 analyze table store_bigint compute statistics;
 analyze table store_bigint compute statistics for columns s_store_sk, 
s_floor_space;
-analyze table store_sales compute statistics;
-analyze table store_sales compute statistics for columns ss_store_sk, 
ss_addr_sk, ss_quantity;
+analyze table store_sales_n0 compute statistics;
+analyze table store_sales_n0 compute statistics for columns ss_store_sk, 
ss_addr_sk, ss_quantity;
 analyze table customer_address compute statistics;
 analyze table customer_address compute statistics for columns ca_address_sk;
 
-explain select s.s_store_sk from store s join store_sales ss on (s.s_store_sk 
= ss.ss_store_sk);
+explain select s.s_store_sk from store_n0 s join store_sales_n0 ss on 
(s.s_store_sk = ss.ss_store_sk);
 
 -- widening cast: inferred PK-FK, thus same row count as previous query
-explain select s.s_store_sk from store_bigint s join store_sales ss on 
(s.s_store_sk = ss.ss_store_sk);
+explain select s.s_store_sk from store_bigint s join store_sales_n0 ss on 
(s.s_store_sk = ss.ss_store_sk);
 
-explain select s.s_store_sk from store s join store_sales ss on (s.s_store_sk 
= ss.ss_store_sk) where s.s_store_sk > 0;
+explain select s.s_store_sk from store_n0 s join store_sales_n0 ss on 
(s.s_store_sk = ss.ss_store_sk) where s.s_store_sk > 0;
 
-explain select s.s_store_sk from store s join store_sales ss on (s.s_store_sk 
= ss.ss_store_sk) where s.s_company_id > 0 and ss.ss_quantity > 10;
+explain select s.s_store_sk from store_n0 s join store_sales_n0 ss on 
(s.s_store_sk = ss.ss_store_sk) where s.s_company_id > 0 and ss.ss_quantity > 
10;
 
-explain select s.s_store_sk from store s join store_sales ss on (s.s_store_sk 
= ss.ss_store_sk) where s.s_floor_space > 0;
+explain select s.s_store_sk from store_n0 s join store_sales_n0 ss on 
(s.s_store_sk = ss.ss_store_sk) where s.s_floor_space > 0;
 
-explain select s.s_store_sk from store s join store_sales ss on (s.s_store_sk 
= ss.ss_store_sk) where ss.ss_quantity > 10;
+explain select s.s_store_sk from store_n0 s join store_sales_n0 ss on 
(s.s_store_sk = ss.ss_store_sk) where ss.ss_quantity > 10;
 
-explain select s.s_store_sk from store s join store_sales ss on (s.s_store_sk 
= ss.ss_store_sk) join store s1 on (s1.s_store_sk = ss.ss_store_sk);
+explain select s.s_store_sk from store_n0 s join store_sales_n0 ss on 
(s.s_store_sk = ss.ss_store_sk) join store_n0 s1 on (s1.s_store_sk = 
ss.ss_store_sk);
 
-explain select s.s_store_sk from store s join store_sales ss on (s.s_store_sk 
= ss.ss_store_sk) join store s1 on (s1.s_store_sk = ss.ss_store_sk) where 
s.s_store_sk > 1000;
+explain select s.s_store_sk from store_n0 s join store_sales_n0 ss on 
(s.s_store_sk = ss.ss_store_sk) join store_n0 s1 on (s1.s_store_sk = 
ss.ss_store_sk) where s.s_store_sk > 1000;
 
-explain select s.s_store_sk from store s join store_sales ss on (s.s_store_sk 
= ss.ss_store_sk) join store s1 on (s1.s_store_sk = ss.ss_store_sk) where 
s.s_floor_space > 1000;
+explain select s.s_store_sk from store_n0 s join store_sales_n0 ss on 
(s.s_store_sk = ss.ss_store_sk) join store_n0 s1 on (s1.s_store_sk = 
ss.ss_store_sk) where s.s_floor_space > 1000;
 
-explain select s.s_store_sk from store s join store_sales ss on (s.s_store_sk 
= ss.ss_store_sk) join store s1 on (s1.s_store_sk = ss.ss_store_sk) where 
ss.ss_quantity > 10;
+explain select s.s_store_sk from store_n0 s join store_sales_n0 ss on 
(s.s_store_sk = ss.ss_store_sk) join store_n0 s1 on (s1.s_store_sk = 
ss.ss_store_sk) where ss.ss_quantity > 10;
 
-explain select s.s_store_sk from store s join store_sales ss on (s.s_store_sk 
= ss.ss_store_sk) join customer_address ca on (ca.ca_address_sk = 
ss.ss_addr_sk);
+explain select s.s_store_sk from store_n0 s join store_sales_n0 ss on 
(s.s_store_sk = ss.ss_store_sk) join customer_address ca on (ca.ca_address_sk = 
ss.ss_addr_sk);
 
-drop table store_sales;
-drop table store;
+drop table store_sales_n0;
+drop table store_n0;
 drop table store_bigint;
 drop table customer_address;

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/annotate_stats_limit.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/annotate_stats_limit.q 
b/ql/src/test/queries/clientpositive/annotate_stats_limit.q
index b82fe30..2fe7508 100644
--- a/ql/src/test/queries/clientpositive/annotate_stats_limit.q
+++ b/ql/src/test/queries/clientpositive/annotate_stats_limit.q
@@ -1,30 +1,30 @@
 set hive.stats.fetch.column.stats=true;
 
-create table if not exists loc_staging (
+create table if not exists loc_staging_n5 (
   state string,
   locid int,
   zip bigint,
   year int
 ) row format delimited fields terminated by '|' stored as textfile;
 
-create table loc_orc like loc_staging;
-alter table loc_orc set fileformat orc;
+create table loc_orc_n5 like loc_staging_n5;
+alter table loc_orc_n5 set fileformat orc;
 
-load data local inpath '../../data/files/loc.txt' overwrite into table 
loc_staging;
+load data local inpath '../../data/files/loc.txt' overwrite into table 
loc_staging_n5;
 
-insert overwrite table loc_orc select * from loc_staging;
+insert overwrite table loc_orc_n5 select * from loc_staging_n5;
 
-analyze table loc_orc compute statistics for columns state, locid, zip, year;
+analyze table loc_orc_n5 compute statistics for columns state, locid, zip, 
year;
 
 -- numRows: 8 rawDataSize: 796
-explain select * from loc_orc;
+explain select * from loc_orc_n5;
 
 -- numRows: 4 rawDataSize: 396
-explain select * from loc_orc limit 4;
+explain select * from loc_orc_n5 limit 4;
 
 -- greater than the available number of rows
 -- numRows: 8 rawDataSize: 796
-explain select * from loc_orc limit 16;
+explain select * from loc_orc_n5 limit 16;
 
 -- numRows: 0 rawDataSize: 0
-explain select * from loc_orc limit 0;
+explain select * from loc_orc_n5 limit 0;

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/annotate_stats_part.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/annotate_stats_part.q 
b/ql/src/test/queries/clientpositive/annotate_stats_part.q
index 5bdaaff..c8e5c49 100644
--- a/ql/src/test/queries/clientpositive/annotate_stats_part.q
+++ b/ql/src/test/queries/clientpositive/annotate_stats_part.q
@@ -5,86 +5,86 @@ set hive.exec.dynamic.partition=true;
 set hive.exec.dynamic.partition.mode=nonstrict;
 set hive.metastore.aggregate.stats.cache.enabled=false;
 
-create table if not exists loc_staging (
+create table if not exists loc_staging_n4 (
   state string,
   locid int,
   zip bigint,
   year string
 ) row format delimited fields terminated by '|' stored as textfile;
 
-LOAD DATA LOCAL INPATH '../../data/files/loc.txt' OVERWRITE INTO TABLE 
loc_staging;
+LOAD DATA LOCAL INPATH '../../data/files/loc.txt' OVERWRITE INTO TABLE 
loc_staging_n4;
 
-create table if not exists loc_orc (
+create table if not exists loc_orc_n4 (
   state string,
   locid int,
   zip bigint
 ) partitioned by(year string) stored as orc;
 
 -- basicStatState: NONE colStatState: NONE
-explain select * from loc_orc;
+explain select * from loc_orc_n4;
 
-insert overwrite table loc_orc partition(year) select * from loc_staging;
+insert overwrite table loc_orc_n4 partition(year) select * from loc_staging_n4;
 
 -- stats are disabled. basic stats will report the file size but not raw data 
size. so initial statistics will be PARTIAL
 
 -- basicStatState: PARTIAL colStatState: NONE
-explain select * from loc_orc;
+explain select * from loc_orc_n4;
 
 -- partition level analyze statistics for specific parition
-analyze table loc_orc partition(year='2001') compute statistics;
+analyze table loc_orc_n4 partition(year='2001') compute statistics;
 
 -- basicStatState: PARTIAL colStatState: NONE
-explain select * from loc_orc where year='__HIVE_DEFAULT_PARTITION__';
+explain select * from loc_orc_n4 where year='__HIVE_DEFAULT_PARTITION__';
 
 -- basicStatState: PARTIAL colStatState: NONE
-explain select * from loc_orc;
+explain select * from loc_orc_n4;
 
 -- basicStatState: COMPLETE colStatState: NONE
-explain select * from loc_orc where year='2001';
+explain select * from loc_orc_n4 where year='2001';
 
 -- partition level analyze statistics for all partitions
-analyze table loc_orc partition(year) compute statistics;
+analyze table loc_orc_n4 partition(year) compute statistics;
 
 -- basicStatState: COMPLETE colStatState: NONE
-explain select * from loc_orc where year='__HIVE_DEFAULT_PARTITION__';
+explain select * from loc_orc_n4 where year='__HIVE_DEFAULT_PARTITION__';
 
 -- basicStatState: COMPLETE colStatState: NONE
-explain select * from loc_orc;
+explain select * from loc_orc_n4;
 
 -- basicStatState: COMPLETE colStatState: NONE
-explain select * from loc_orc where year='2001' or 
year='__HIVE_DEFAULT_PARTITION__';
+explain select * from loc_orc_n4 where year='2001' or 
year='__HIVE_DEFAULT_PARTITION__';
 
 -- both partitions will be pruned
 -- basicStatState: NONE colStatState: NONE
-explain select * from loc_orc where year='2001' and 
year='__HIVE_DEFAULT_PARTITION__';
+explain select * from loc_orc_n4 where year='2001' and 
year='__HIVE_DEFAULT_PARTITION__';
 
 -- partition level partial column statistics
-analyze table loc_orc partition(year='2001') compute statistics for columns 
state,locid;
+analyze table loc_orc_n4 partition(year='2001') compute statistics for columns 
state,locid;
 
 -- basicStatState: COMPLETE colStatState: NONE
-explain select zip from loc_orc;
+explain select zip from loc_orc_n4;
 
 -- basicStatState: COMPLETE colStatState: PARTIAL
-explain select state from loc_orc;
+explain select state from loc_orc_n4;
 
 -- basicStatState: COMPLETE colStatState: COMPLETE
-explain select year from loc_orc;
+explain select year from loc_orc_n4;
 
 -- column statistics for __HIVE_DEFAULT_PARTITION__ is not supported yet. 
Hence colStatState reports PARTIAL
 -- basicStatState: COMPLETE colStatState: PARTIAL
-explain select state,locid from loc_orc;
+explain select state,locid from loc_orc_n4;
 
 -- basicStatState: COMPLETE colStatState: COMPLETE
-explain select state,locid from loc_orc where year='2001';
+explain select state,locid from loc_orc_n4 where year='2001';
 
 -- basicStatState: COMPLETE colStatState: NONE
-explain select state,locid from loc_orc where year!='2001';
+explain select state,locid from loc_orc_n4 where year!='2001';
 
 -- basicStatState: COMPLETE colStatState: PARTIAL
-explain select * from loc_orc;
+explain select * from loc_orc_n4;
 
 -- This is to test filter expression evaluation on partition column
 -- numRows: 2 dataSize: 8 basicStatState: COMPLETE colStatState: COMPLETE
-explain select locid from loc_orc where locid>0 and year='2001';
-explain select locid,year from loc_orc where locid>0 and year='2001';
-explain select * from (select locid,year from loc_orc) test where locid>0 and 
year='2001';
+explain select locid from loc_orc_n4 where locid>0 and year='2001';
+explain select locid,year from loc_orc_n4 where locid>0 and year='2001';
+explain select * from (select locid,year from loc_orc_n4) test where locid>0 
and year='2001';

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/annotate_stats_table.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/annotate_stats_table.q 
b/ql/src/test/queries/clientpositive/annotate_stats_table.q
index b5389ff..475baed 100644
--- a/ql/src/test/queries/clientpositive/annotate_stats_table.q
+++ b/ql/src/test/queries/clientpositive/annotate_stats_table.q
@@ -52,5 +52,5 @@ explain select deptid from emp_orc;
 -- basicStatState: COMPLETE colStatState: COMPLETE
 explain select lastname,deptid from emp_orc;
 
-create table tmp as select 1;
-explain create table tmp as select 1;
+create table tmp_n0 as select 1;
+explain create table tmp_n0 as select 1;

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/annotate_stats_union.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/annotate_stats_union.q 
b/ql/src/test/queries/clientpositive/annotate_stats_union.q
index b0017f5..8417661 100644
--- a/ql/src/test/queries/clientpositive/annotate_stats_union.q
+++ b/ql/src/test/queries/clientpositive/annotate_stats_union.q
@@ -1,55 +1,55 @@
 set hive.stats.fetch.column.stats=true;
 
-create table if not exists loc_staging (
+create table if not exists loc_staging_n3 (
   state string,
   locid int,
   zip bigint,
   year int
 ) row format delimited fields terminated by '|' stored as textfile;
 
-create table loc_orc like loc_staging;
-alter table loc_orc set fileformat orc;
+create table loc_orc_n3 like loc_staging_n3;
+alter table loc_orc_n3 set fileformat orc;
 
-load data local inpath '../../data/files/loc.txt' overwrite into table 
loc_staging;
+load data local inpath '../../data/files/loc.txt' overwrite into table 
loc_staging_n3;
 
-insert overwrite table loc_orc select * from loc_staging;
+insert overwrite table loc_orc_n3 select * from loc_staging_n3;
 
-analyze table loc_orc compute statistics for columns state,locid,zip,year;
+analyze table loc_orc_n3 compute statistics for columns state,locid,zip,year;
 
 -- numRows: 8 rawDataSize: 688
-explain select state from loc_orc;
+explain select state from loc_orc_n3;
 
 -- numRows: 16 rawDataSize: 1376
-explain select * from (select state from loc_orc union all select state from 
loc_orc) tmp;
+explain select * from (select state from loc_orc_n3 union all select state 
from loc_orc_n3) tmp;
 
 -- numRows: 8 rawDataSize: 796
-explain select * from loc_orc;
+explain select * from loc_orc_n3;
 
 -- numRows: 16 rawDataSize: 1592
-explain select * from (select * from loc_orc union all select * from loc_orc) 
tmp;
+explain select * from (select * from loc_orc_n3 union all select * from 
loc_orc_n3) tmp;
 
 create database test;
 use test;
-create table if not exists loc_staging (
+create table if not exists loc_staging_n3 (
   state string,
   locid int,
   zip bigint,
   year int
 ) row format delimited fields terminated by '|' stored as textfile;
 
-create table loc_orc like loc_staging;
-alter table loc_orc set fileformat orc;
+create table loc_orc_n3 like loc_staging_n3;
+alter table loc_orc_n3 set fileformat orc;
 
-load data local inpath '../../data/files/loc.txt' overwrite into table 
loc_staging;
+load data local inpath '../../data/files/loc.txt' overwrite into table 
loc_staging_n3;
 
-insert overwrite table loc_orc select * from loc_staging;
+insert overwrite table loc_orc_n3 select * from loc_staging_n3;
 
-analyze table loc_staging compute statistics;
-analyze table loc_staging compute statistics for columns state,locid,zip,year;
-analyze table loc_orc compute statistics for columns state,locid,zip,year;
+analyze table loc_staging_n3 compute statistics;
+analyze table loc_staging_n3 compute statistics for columns 
state,locid,zip,year;
+analyze table loc_orc_n3 compute statistics for columns state,locid,zip,year;
 
 -- numRows: 16 rawDataSize: 1376
-explain select * from (select state from default.loc_orc union all select 
state from test.loc_orc) temp;
+explain select * from (select state from default.loc_orc_n3 union all select 
state from test.loc_orc_n3) temp;
 
 -- numRows: 16 rawDataSize: 1376
-explain select * from (select state from test.loc_staging union all select 
state from test.loc_orc) temp;
+explain select * from (select state from test.loc_staging_n3 union all select 
state from test.loc_orc_n3) temp;

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/archive_excludeHadoop20.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/archive_excludeHadoop20.q 
b/ql/src/test/queries/clientpositive/archive_excludeHadoop20.q
index 6d5e2ac..6f77fa8 100644
--- a/ql/src/test/queries/clientpositive/archive_excludeHadoop20.q
+++ b/ql/src/test/queries/clientpositive/archive_excludeHadoop20.q
@@ -5,61 +5,61 @@ set hive.archive.enabled = true;
 set hive.exec.submitviachild=false;
 set hive.exec.submit.local.task.via.child=false;
 
-drop table tstsrc;
-drop table tstsrcpart;
+drop table tstsrc_n2;
+drop table tstsrcpart_n2;
 
-create table tstsrc like src;
-insert overwrite table tstsrc select key, value from src;
+create table tstsrc_n2 like src;
+insert overwrite table tstsrc_n2 select key, value from src;
 
-create table tstsrcpart (key string, value string) partitioned by (ds string, 
hr string) clustered by (key) into 10 buckets;
+create table tstsrcpart_n2 (key string, value string) partitioned by (ds 
string, hr string) clustered by (key) into 10 buckets;
 
-insert overwrite table tstsrcpart partition (ds='2008-04-08', hr='11')
+insert overwrite table tstsrcpart_n2 partition (ds='2008-04-08', hr='11')
 select key, value from srcpart where ds='2008-04-08' and hr='11';
 
-insert overwrite table tstsrcpart partition (ds='2008-04-08', hr='12')
+insert overwrite table tstsrcpart_n2 partition (ds='2008-04-08', hr='12')
 select key, value from srcpart where ds='2008-04-08' and hr='12';
 
-insert overwrite table tstsrcpart partition (ds='2008-04-09', hr='11')
+insert overwrite table tstsrcpart_n2 partition (ds='2008-04-09', hr='11')
 select key, value from srcpart where ds='2008-04-09' and hr='11';
 
-insert overwrite table tstsrcpart partition (ds='2008-04-09', hr='12')
+insert overwrite table tstsrcpart_n2 partition (ds='2008-04-09', hr='12')
 select key, value from srcpart where ds='2008-04-09' and hr='12';
 
 SELECT SUM(hash(col)) FROM (SELECT transform(*) using 'tr "\t" "_"' AS col
-FROM (SELECT * FROM tstsrcpart WHERE ds='2008-04-08') subq1) subq2;
+FROM (SELECT * FROM tstsrcpart_n2 WHERE ds='2008-04-08') subq1) subq2;
 
-ALTER TABLE tstsrcpart ARCHIVE PARTITION (ds='2008-04-08', hr='12');
+ALTER TABLE tstsrcpart_n2 ARCHIVE PARTITION (ds='2008-04-08', hr='12');
 
 SELECT SUM(hash(col)) FROM (SELECT transform(*) using 'tr "\t" "_"' AS col
-FROM (SELECT * FROM tstsrcpart WHERE ds='2008-04-08') subq1) subq2;
+FROM (SELECT * FROM tstsrcpart_n2 WHERE ds='2008-04-08') subq1) subq2;
 
-SELECT key, count(1) FROM tstsrcpart WHERE ds='2008-04-08' AND hr='12' AND 
key='0' GROUP BY key;
+SELECT key, count(1) FROM tstsrcpart_n2 WHERE ds='2008-04-08' AND hr='12' AND 
key='0' GROUP BY key;
 
-SELECT * FROM tstsrcpart a JOIN tstsrc b ON a.key=b.key
+SELECT * FROM tstsrcpart_n2 a JOIN tstsrc_n2 b ON a.key=b.key
 WHERE a.ds='2008-04-08' AND a.hr='12' AND a.key='0';
 
-ALTER TABLE tstsrcpart UNARCHIVE PARTITION (ds='2008-04-08', hr='12');
+ALTER TABLE tstsrcpart_n2 UNARCHIVE PARTITION (ds='2008-04-08', hr='12');
 
 SELECT SUM(hash(col)) FROM (SELECT transform(*) using 'tr "\t" "_"' AS col
-FROM (SELECT * FROM tstsrcpart WHERE ds='2008-04-08') subq1) subq2;
+FROM (SELECT * FROM tstsrcpart_n2 WHERE ds='2008-04-08') subq1) subq2;
 
 CREATE TABLE harbucket(key INT)
 PARTITIONED by (ds STRING)
 CLUSTERED BY (key) INTO 10 BUCKETS;
 
-INSERT OVERWRITE TABLE harbucket PARTITION(ds='1') SELECT CAST(key AS INT) AS 
a FROM tstsrc WHERE key > 50;
+INSERT OVERWRITE TABLE harbucket PARTITION(ds='1') SELECT CAST(key AS INT) AS 
a FROM tstsrc_n2 WHERE key > 50;
 
 SELECT key FROM harbucket TABLESAMPLE(BUCKET 1 OUT OF 10) SORT BY key;
-ALTER TABLE tstsrcpart ARCHIVE PARTITION (ds='2008-04-08', hr='12');
+ALTER TABLE tstsrcpart_n2 ARCHIVE PARTITION (ds='2008-04-08', hr='12');
 SELECT key FROM harbucket TABLESAMPLE(BUCKET 1 OUT OF 10) SORT BY key;
-ALTER TABLE tstsrcpart UNARCHIVE PARTITION (ds='2008-04-08', hr='12');
+ALTER TABLE tstsrcpart_n2 UNARCHIVE PARTITION (ds='2008-04-08', hr='12');
 SELECT key FROM harbucket TABLESAMPLE(BUCKET 1 OUT OF 10) SORT BY key;
 
 
 CREATE TABLE old_name(key INT)
 PARTITIONED by (ds STRING);
 
-INSERT OVERWRITE TABLE old_name PARTITION(ds='1') SELECT CAST(key AS INT) AS a 
FROM tstsrc WHERE key > 50;
+INSERT OVERWRITE TABLE old_name PARTITION(ds='1') SELECT CAST(key AS INT) AS a 
FROM tstsrc_n2 WHERE key > 50;
 ALTER TABLE old_name ARCHIVE PARTITION (ds='1');
 SELECT SUM(hash(col)) FROM (SELECT transform(*) using 'tr "\t" "_"' AS col
 FROM (SELECT * FROM old_name WHERE ds='1') subq1) subq2;
@@ -67,5 +67,5 @@ ALTER TABLE old_name RENAME TO new_name;
 SELECT SUM(hash(col)) FROM (SELECT transform(*) using 'tr "\t" "_"' AS col
 FROM (SELECT * FROM new_name WHERE ds='1') subq1) subq2;
 
-drop table tstsrc;
-drop table tstsrcpart;
+drop table tstsrc_n2;
+drop table tstsrcpart_n2;

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/array_size_estimation.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/array_size_estimation.q 
b/ql/src/test/queries/clientpositive/array_size_estimation.q
index 74713c4..8b69b63 100644
--- a/ql/src/test/queries/clientpositive/array_size_estimation.q
+++ b/ql/src/test/queries/clientpositive/array_size_estimation.q
@@ -1,16 +1,16 @@
 set hive.stats.fetch.column.stats=true;
 
-create table t (col string);
-insert into t values ('x');
+create table t_n19 (col string);
+insert into t_n19 values ('x');
 
 explain
-select array("b", "d", "c", "a") FROM t;
+select array("b", "d", "c", "a") FROM t_n19;
 
 explain
-select array("b", "d", "c", col) FROM t;
+select array("b", "d", "c", col) FROM t_n19;
 
 explain
-select sort_array(array("b", "d", "c", "a")),array("1","2") FROM t;
+select sort_array(array("b", "d", "c", "a")),array("1","2") FROM t_n19;
 
 explain
-select sort_array(array("b", "d", "c", col)),array("1","2") FROM t;
+select sort_array(array("b", "d", "c", col)),array("1","2") FROM t_n19;

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/authorization_1.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/authorization_1.q 
b/ql/src/test/queries/clientpositive/authorization_1.q
index 42abff0..80e7a5d 100644
--- a/ql/src/test/queries/clientpositive/authorization_1.q
+++ b/ql/src/test/queries/clientpositive/authorization_1.q
@@ -3,61 +3,61 @@ set 
hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.autho
 
 -- SORT_BEFORE_DIFF
 
-create table src_autho_test as select * from src;
+create table src_autho_test_n11 as select * from src;
 
 set hive.security.authorization.enabled=true;
 
 --table grant to user
 
-grant select on table src_autho_test to user hive_test_user;
+grant select on table src_autho_test_n11 to user hive_test_user;
 
-show grant user hive_test_user on table src_autho_test;
-show grant user hive_test_user on table src_autho_test(key);
+show grant user hive_test_user on table src_autho_test_n11;
+show grant user hive_test_user on table src_autho_test_n11(key);
 
-select key from src_autho_test order by key limit 20;
+select key from src_autho_test_n11 order by key limit 20;
 
-revoke select on table src_autho_test from user hive_test_user;
-show grant user hive_test_user on table src_autho_test;
-show grant user hive_test_user on table src_autho_test(key);
+revoke select on table src_autho_test_n11 from user hive_test_user;
+show grant user hive_test_user on table src_autho_test_n11;
+show grant user hive_test_user on table src_autho_test_n11(key);
 
 --column grant to user
 
-grant select(key) on table src_autho_test to user hive_test_user;
+grant select(key) on table src_autho_test_n11 to user hive_test_user;
 
-show grant user hive_test_user on table src_autho_test;
-show grant user hive_test_user on table src_autho_test(key);
+show grant user hive_test_user on table src_autho_test_n11;
+show grant user hive_test_user on table src_autho_test_n11(key);
 
-select key from src_autho_test order by key limit 20;
+select key from src_autho_test_n11 order by key limit 20;
 
-revoke select(key) on table src_autho_test from user hive_test_user;
-show grant user hive_test_user on table src_autho_test;
-show grant user hive_test_user on table src_autho_test(key); 
+revoke select(key) on table src_autho_test_n11 from user hive_test_user;
+show grant user hive_test_user on table src_autho_test_n11;
+show grant user hive_test_user on table src_autho_test_n11(key); 
 
 --table grant to group
 
-grant select on table src_autho_test to group hive_test_group1;
+grant select on table src_autho_test_n11 to group hive_test_group1;
 
-show grant group hive_test_group1 on table src_autho_test;
-show grant group hive_test_group1 on table src_autho_test(key);
+show grant group hive_test_group1 on table src_autho_test_n11;
+show grant group hive_test_group1 on table src_autho_test_n11(key);
 
-select key from src_autho_test order by key limit 20;
+select key from src_autho_test_n11 order by key limit 20;
 
-revoke select on table src_autho_test from group hive_test_group1;
-show grant group hive_test_group1 on table src_autho_test;
-show grant group hive_test_group1 on table src_autho_test(key);
+revoke select on table src_autho_test_n11 from group hive_test_group1;
+show grant group hive_test_group1 on table src_autho_test_n11;
+show grant group hive_test_group1 on table src_autho_test_n11(key);
 
 --column grant to group
 
-grant select(key) on table src_autho_test to group hive_test_group1;
+grant select(key) on table src_autho_test_n11 to group hive_test_group1;
 
-show grant group hive_test_group1 on table src_autho_test;
-show grant group hive_test_group1 on table src_autho_test(key);
+show grant group hive_test_group1 on table src_autho_test_n11;
+show grant group hive_test_group1 on table src_autho_test_n11(key);
 
-select key from src_autho_test order by key limit 20;
+select key from src_autho_test_n11 order by key limit 20;
 
-revoke select(key) on table src_autho_test from group hive_test_group1;
-show grant group hive_test_group1 on table src_autho_test;
-show grant group hive_test_group1 on table src_autho_test(key);
+revoke select(key) on table src_autho_test_n11 from group hive_test_group1;
+show grant group hive_test_group1 on table src_autho_test_n11;
+show grant group hive_test_group1 on table src_autho_test_n11(key);
 
 --role
 create role sRc_roLE;
@@ -66,27 +66,27 @@ show role grant user hive_test_user;
 
 --column grant to role
 
-grant select(key) on table src_autho_test to role sRc_roLE;
+grant select(key) on table src_autho_test_n11 to role sRc_roLE;
 
-show grant role sRc_roLE on table src_autho_test;
-show grant role sRc_roLE on table src_autho_test(key);
+show grant role sRc_roLE on table src_autho_test_n11;
+show grant role sRc_roLE on table src_autho_test_n11(key);
 
-select key from src_autho_test order by key limit 20;
+select key from src_autho_test_n11 order by key limit 20;
 
-revoke select(key) on table src_autho_test from role sRc_roLE;
+revoke select(key) on table src_autho_test_n11 from role sRc_roLE;
 
 --table grant to role
 
-grant select on table src_autho_test to role sRc_roLE;
+grant select on table src_autho_test_n11 to role sRc_roLE;
 
-select key from src_autho_test order by key limit 20;
+select key from src_autho_test_n11 order by key limit 20;
 
-show grant role sRc_roLE on table src_autho_test;
-show grant role sRc_roLE on table src_autho_test(key);
-revoke select on table src_autho_test from role sRc_roLE;
+show grant role sRc_roLE on table src_autho_test_n11;
+show grant role sRc_roLE on table src_autho_test_n11(key);
+revoke select on table src_autho_test_n11 from role sRc_roLE;
 
 -- drop role
 drop role sRc_roLE;
 
 set hive.security.authorization.enabled=false;
-drop table src_autho_test;
+drop table src_autho_test_n11;

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/authorization_3.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/authorization_3.q 
b/ql/src/test/queries/clientpositive/authorization_3.q
index 95c25fe..b3c090e 100644
--- a/ql/src/test/queries/clientpositive/authorization_3.q
+++ b/ql/src/test/queries/clientpositive/authorization_3.q
@@ -3,20 +3,20 @@ set 
hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.autho
 
 -- SORT_BEFORE_DIFF
 
-create table src_autho_test as select * from src;
+create table src_autho_test_n5 as select * from src;
 
-grant drop on table src_autho_test to user hive_test_user;
-grant select on table src_autho_test to user hive_test_user;
+grant drop on table src_autho_test_n5 to user hive_test_user;
+grant select on table src_autho_test_n5 to user hive_test_user;
 
-show grant user hive_test_user on table src_autho_test;
+show grant user hive_test_user on table src_autho_test_n5;
 
-revoke select on table src_autho_test from user hive_test_user;
-revoke drop on table src_autho_test from user hive_test_user;
+revoke select on table src_autho_test_n5 from user hive_test_user;
+revoke drop on table src_autho_test_n5 from user hive_test_user;
 
-grant drop,select on table src_autho_test to user hive_test_user;
-show grant user hive_test_user on table src_autho_test;
-revoke drop,select on table src_autho_test from user hive_test_user;
+grant drop,select on table src_autho_test_n5 to user hive_test_user;
+show grant user hive_test_user on table src_autho_test_n5;
+revoke drop,select on table src_autho_test_n5 from user hive_test_user;
 
-grant drop,select(key), select(value) on table src_autho_test to user 
hive_test_user;
-show grant user hive_test_user on table src_autho_test;
-revoke drop,select(key), select(value) on table src_autho_test from user 
hive_test_user;
+grant drop,select(key), select(value) on table src_autho_test_n5 to user 
hive_test_user;
+show grant user hive_test_user on table src_autho_test_n5;
+revoke drop,select(key), select(value) on table src_autho_test_n5 from user 
hive_test_user;

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/authorization_4.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/authorization_4.q 
b/ql/src/test/queries/clientpositive/authorization_4.q
index f76ba1f..a5a65ae 100644
--- a/ql/src/test/queries/clientpositive/authorization_4.q
+++ b/ql/src/test/queries/clientpositive/authorization_4.q
@@ -3,14 +3,14 @@ set 
hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.autho
 
 -- SORT_BEFORE_DIFF
 
-create table src_autho_test as select * from src;
+create table src_autho_test_n2 as select * from src;
 
-grant All on table src_autho_test to user hive_test_user;
+grant All on table src_autho_test_n2 to user hive_test_user;
 
 set hive.security.authorization.enabled=true;
 
-show grant user hive_test_user on table src_autho_test;
+show grant user hive_test_user on table src_autho_test_n2;
 
-select key from src_autho_test order by key limit 20;
+select key from src_autho_test_n2 order by key limit 20;
 
-drop table src_autho_test;
+drop table src_autho_test_n2;

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/authorization_6.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/authorization_6.q 
b/ql/src/test/queries/clientpositive/authorization_6.q
index f105d05..e8b53ab 100644
--- a/ql/src/test/queries/clientpositive/authorization_6.q
+++ b/ql/src/test/queries/clientpositive/authorization_6.q
@@ -3,43 +3,43 @@ set 
hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.autho
 
 -- SORT_BEFORE_DIFF
 
-create table src_auth_tmp as select * from src;
+create table src_auth_tmp_n0 as select * from src;
 
-create table authorization_part (key int, value string) partitioned by (ds 
string);
-ALTER TABLE authorization_part SET TBLPROPERTIES 
("PARTITION_LEVEL_PRIVILEGE"="TRUE");
+create table authorization_part_n0 (key int, value string) partitioned by (ds 
string);
+ALTER TABLE authorization_part_n0 SET TBLPROPERTIES 
("PARTITION_LEVEL_PRIVILEGE"="TRUE");
 set hive.security.authorization.enabled=true;
-grant select on table src_auth_tmp to user hive_test_user;
+grant select on table src_auth_tmp_n0 to user hive_test_user;
 
 -- column grant to user
-grant Create on table authorization_part to user hive_test_user;
-grant Update on table authorization_part to user hive_test_user;
-grant Drop on table authorization_part to user hive_test_user;
+grant Create on table authorization_part_n0 to user hive_test_user;
+grant Update on table authorization_part_n0 to user hive_test_user;
+grant Drop on table authorization_part_n0 to user hive_test_user;
 
-show grant user hive_test_user on table authorization_part;
-grant select(key) on table authorization_part to user hive_test_user;
-insert overwrite table authorization_part partition (ds='2010') select key, 
value from src_auth_tmp;
-insert overwrite table authorization_part partition (ds='2011') select key, 
value from src_auth_tmp; 
-show grant user hive_test_user on table authorization_part(key) partition 
(ds='2010');
-show grant user hive_test_user on table authorization_part(key) partition 
(ds='2011');
-show grant user hive_test_user on table authorization_part(key);
-select key from authorization_part where ds>='2010' order by key limit 20;
+show grant user hive_test_user on table authorization_part_n0;
+grant select(key) on table authorization_part_n0 to user hive_test_user;
+insert overwrite table authorization_part_n0 partition (ds='2010') select key, 
value from src_auth_tmp_n0;
+insert overwrite table authorization_part_n0 partition (ds='2011') select key, 
value from src_auth_tmp_n0; 
+show grant user hive_test_user on table authorization_part_n0(key) partition 
(ds='2010');
+show grant user hive_test_user on table authorization_part_n0(key) partition 
(ds='2011');
+show grant user hive_test_user on table authorization_part_n0(key);
+select key from authorization_part_n0 where ds>='2010' order by key limit 20;
 
-drop table authorization_part;
+drop table authorization_part_n0;
 
 set hive.security.authorization.enabled=false;
-create table authorization_part (key int, value string) partitioned by (ds 
string);
-ALTER TABLE authorization_part SET TBLPROPERTIES 
("PARTITION_LEVEL_PRIVILEGE"="FALSE");
+create table authorization_part_n0 (key int, value string) partitioned by (ds 
string);
+ALTER TABLE authorization_part_n0 SET TBLPROPERTIES 
("PARTITION_LEVEL_PRIVILEGE"="FALSE");
 
 set hive.security.authorization.enabled=true;
-grant Create on table authorization_part to user hive_test_user;
-grant Update on table authorization_part to user hive_test_user;
-
-show grant user hive_test_user on table authorization_part;
-
-grant select(key) on table authorization_part to user hive_test_user;
-insert overwrite table authorization_part partition (ds='2010') select key, 
value from src_auth_tmp;
-insert overwrite table authorization_part partition (ds='2011') select key, 
value from src_auth_tmp; 
-show grant user hive_test_user on table authorization_part(key) partition 
(ds='2010');
-show grant user hive_test_user on table authorization_part(key) partition 
(ds='2011');
-show grant user hive_test_user on table authorization_part(key);
-select key from authorization_part where ds>='2010' order by key limit 20;
+grant Create on table authorization_part_n0 to user hive_test_user;
+grant Update on table authorization_part_n0 to user hive_test_user;
+
+show grant user hive_test_user on table authorization_part_n0;
+
+grant select(key) on table authorization_part_n0 to user hive_test_user;
+insert overwrite table authorization_part_n0 partition (ds='2010') select key, 
value from src_auth_tmp_n0;
+insert overwrite table authorization_part_n0 partition (ds='2011') select key, 
value from src_auth_tmp_n0; 
+show grant user hive_test_user on table authorization_part_n0(key) partition 
(ds='2010');
+show grant user hive_test_user on table authorization_part_n0(key) partition 
(ds='2011');
+show grant user hive_test_user on table authorization_part_n0(key);
+select key from authorization_part_n0 where ds>='2010' order by key limit 20;

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/authorization_9.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/authorization_9.q 
b/ql/src/test/queries/clientpositive/authorization_9.q
index 19892dd..40b5e86 100644
--- a/ql/src/test/queries/clientpositive/authorization_9.q
+++ b/ql/src/test/queries/clientpositive/authorization_9.q
@@ -4,21 +4,21 @@ set 
hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.autho
 create database authorization_9;
 use authorization_9;
 
-create table dummy (key string, value string);
+create table dummy_n1 (key string, value string);
 
 grant select to user hive_test_user;
 grant select on database authorization_9 to user hive_test_user;
-grant select on table dummy to user hive_test_user;
-grant select (key, value) on table dummy to user hive_test_user;
+grant select on table dummy_n1 to user hive_test_user;
+grant select (key, value) on table dummy_n1 to user hive_test_user;
 
 show grant user hive_test_user on database authorization_9;
-show grant user hive_test_user on table dummy;
+show grant user hive_test_user on table dummy_n1;
 show grant user hive_test_user on all;
 
 grant select to user hive_test_user2;
 grant select on database authorization_9 to user hive_test_user2;
-grant select on table dummy to user hive_test_user2;
-grant select (key, value) on table dummy to user hive_test_user2;
+grant select on table dummy_n1 to user hive_test_user2;
+grant select (key, value) on table dummy_n1 to user hive_test_user2;
 
 show grant on all;
 show grant user hive_test_user on all;
@@ -26,10 +26,10 @@ show grant user hive_test_user2 on all;
 
 revoke select from user hive_test_user;
 revoke select on database authorization_9 from user hive_test_user;
-revoke select on table dummy from user hive_test_user;
-revoke select (key, value) on table dummy from user hive_test_user;
+revoke select on table dummy_n1 from user hive_test_user;
+revoke select (key, value) on table dummy_n1 from user hive_test_user;
 
 revoke select from user hive_test_user2;
 revoke select on database authorization_9 from user hive_test_user2;
-revoke select on table dummy from user hive_test_user2;
-revoke select (key, value) on table dummy from user hive_test_user2;
+revoke select on table dummy_n1 from user hive_test_user2;
+revoke select (key, value) on table dummy_n1 from user hive_test_user2;

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/authorization_admin_almighty1.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/authorization_admin_almighty1.q 
b/ql/src/test/queries/clientpositive/authorization_admin_almighty1.q
index 3ae0ce1..210f299 100644
--- a/ql/src/test/queries/clientpositive/authorization_admin_almighty1.q
+++ b/ql/src/test/queries/clientpositive/authorization_admin_almighty1.q
@@ -5,13 +5,13 @@ set user.name=hive_test_user;
 
 -- actions from admin should work as if admin has all privileges
 
-create table t1(i int);
+create table t1_n76(i int);
 set user.name=hive_admin_user;
 
 show current roles;
 set role ADMIN;
 show current roles;
-select * from t1;
-grant all on table t1 to user user1;
-show grant user user1 on table t1;
-drop table t1;
+select * from t1_n76;
+grant all on table t1_n76 to user user1;
+show grant user user1 on table t1_n76;
+drop table t1_n76;

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/authorization_cli_createtab_noauthzapi.q
----------------------------------------------------------------------
diff --git 
a/ql/src/test/queries/clientpositive/authorization_cli_createtab_noauthzapi.q 
b/ql/src/test/queries/clientpositive/authorization_cli_createtab_noauthzapi.q
index c39df65..b7a9683 100644
--- 
a/ql/src/test/queries/clientpositive/authorization_cli_createtab_noauthzapi.q
+++ 
b/ql/src/test/queries/clientpositive/authorization_cli_createtab_noauthzapi.q
@@ -7,6 +7,6 @@ set user.name=hive_test_user;
 
 -- verify that sql std auth can be set as the authorizer with hive cli, while 
metastore authorization api calls are disabled (for cli)
 
-create table t_cli(i int);
+create table t_cli_n1(i int);
 
-create view v_cli (i) as select i from t_cli;
+create view v_cli_n0 (i) as select i from t_cli_n1;

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/authorization_cli_nonsql.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/authorization_cli_nonsql.q 
b/ql/src/test/queries/clientpositive/authorization_cli_nonsql.q
index 5bc4814..7e0e1ae 100644
--- a/ql/src/test/queries/clientpositive/authorization_cli_nonsql.q
+++ b/ql/src/test/queries/clientpositive/authorization_cli_nonsql.q
@@ -9,9 +9,9 @@ use default;
 dfs ${system:test.dfs.mkdir} ${system:test.tmp.dir}/a_admin_almighty1;
 dfs -ls ${system:test.tmp.dir}/a_admin_almighty1;
 
-create table a_table1(a int, b int);
+create table a_table1_n0(a int, b int);
 add jar 
${system:maven.local.repository}/org/apache/hive/hive-it-test-serde/${system:hive.version}/hive-it-test-serde-${system:hive.version}.jar;
-alter table a_table1 set serde 'org.apache.hadoop.hive.serde2.TestSerDe' with 
serdeproperties('s1'='9');
+alter table a_table1_n0 set serde 'org.apache.hadoop.hive.serde2.TestSerDe' 
with serdeproperties('s1'='9');
 drop table a_table;
 
 delete jar 
${system:maven.local.repository}/org/apache/hive/hive-it-test-serde/${system:hive.version}/hive-it-test-serde-${system:hive.version}.jar;

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/authorization_cli_stdconfigauth.q
----------------------------------------------------------------------
diff --git 
a/ql/src/test/queries/clientpositive/authorization_cli_stdconfigauth.q 
b/ql/src/test/queries/clientpositive/authorization_cli_stdconfigauth.q
index a3f8e64..4cf547a 100644
--- a/ql/src/test/queries/clientpositive/authorization_cli_stdconfigauth.q
+++ b/ql/src/test/queries/clientpositive/authorization_cli_stdconfigauth.q
@@ -6,5 +6,5 @@ set hive.security.authorization.enabled=true;
 -- verify that SQLStdConfOnlyAuthorizerFactory as the authorizer factory with 
hive cli, with hive.security.authorization.enabled=true
 -- authorization verification would be just no-op
 
-create table t_cli(i int);
-describe t_cli;
+create table t_cli_n0(i int);
+describe t_cli_n0;

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/authorization_grant_option_role.q
----------------------------------------------------------------------
diff --git 
a/ql/src/test/queries/clientpositive/authorization_grant_option_role.q 
b/ql/src/test/queries/clientpositive/authorization_grant_option_role.q
index ea0b51b..3a66acf 100644
--- a/ql/src/test/queries/clientpositive/authorization_grant_option_role.q
+++ b/ql/src/test/queries/clientpositive/authorization_grant_option_role.q
@@ -8,21 +8,21 @@ create role r1;
 grant role r1 to user r1user;
 
 set user.name=user1;
-CREATE TABLE  t1(i int);
+CREATE TABLE  t1_n126(i int);
 
 -- all privileges should have been set for user
 
-GRANT ALL ON t1 TO ROLE r1 WITH GRANT OPTION;
+GRANT ALL ON t1_n126 TO ROLE r1 WITH GRANT OPTION;
 
 set user.name=r1user;
 -- check if user belong to role r1 can grant privileges to others
-GRANT ALL ON t1 TO USER user3;
+GRANT ALL ON t1_n126 TO USER user3;
 
 set user.name=hive_admin_user;
 set role admin;
 -- check privileges on table
-show grant on table t1;
+show grant on table t1_n126;
 
 -- check if drop role removes privileges for that role
 drop role r1;
-show grant on table t1;
+show grant on table t1_n126;

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/authorization_non_id.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/authorization_non_id.q 
b/ql/src/test/queries/clientpositive/authorization_non_id.q
index 26d4b50..9e2c4b0 100644
--- a/ql/src/test/queries/clientpositive/authorization_non_id.q
+++ b/ql/src/test/queries/clientpositive/authorization_non_id.q
@@ -4,8 +4,8 @@ set 
hive.security.authenticator.manager=org.apache.hadoop.hive.ql.security.Sessi
 set user.name=hive_admin_user;
 
 set role ADMIN;
-drop table if exists src_autho_test;
-create table src_autho_test (id int);
+drop table if exists src_autho_test_n12;
+create table src_autho_test_n12 (id int);
 
 create role src_role2;
 
@@ -15,11 +15,11 @@ grant role src_role2 to user `foo-1`;
 show role grant user bar;
 show role grant user `foo-1`;
 
-grant select on table src_autho_test to user bar;
-grant select on table src_autho_test to user `foo-1`;
+grant select on table src_autho_test_n12 to user bar;
+grant select on table src_autho_test_n12 to user `foo-1`;
 
 show grant user bar on all;
 show grant user `foo-1` on all;
 
-drop table src_autho_test;
+drop table src_autho_test_n12;
 drop role src_role2;

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/authorization_owner_actions.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/authorization_owner_actions.q 
b/ql/src/test/queries/clientpositive/authorization_owner_actions.q
index d186a44..7340dbc 100644
--- a/ql/src/test/queries/clientpositive/authorization_owner_actions.q
+++ b/ql/src/test/queries/clientpositive/authorization_owner_actions.q
@@ -5,13 +5,13 @@ set hive.security.authorization.enabled=true;
 set user.name=user1;
 
 -- actions that require user to be table owner
-create table t1(i int);
+create table t1_n108(i int);
 
-ALTER TABLE t1 SET SERDEPROPERTIES ('field.delim' = ',');
-drop table t1;
+ALTER TABLE t1_n108 SET SERDEPROPERTIES ('field.delim' = ',');
+drop table t1_n108;
 
-create table t1(i int);
-create view vt1 as select * from t1;
+create table t1_n108(i int);
+create view vt1_n0 as select * from t1_n108;
 
-drop view vt1;
-alter table t1 rename to tnew1;
+drop view vt1_n0;
+alter table t1_n108 rename to tnew1;

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/authorization_parts.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/authorization_parts.q 
b/ql/src/test/queries/clientpositive/authorization_parts.q
index 18582fc..d1a74a3 100644
--- a/ql/src/test/queries/clientpositive/authorization_parts.q
+++ b/ql/src/test/queries/clientpositive/authorization_parts.q
@@ -11,11 +11,11 @@ dfs ${system:test.dfs.mkdir} 
${system:test.tmp.dir}/a_uri_add_part2;
 
 
 -- check add partition without insert privilege
-create table tpart(i int, j int) partitioned by (k string);
+create table tpart_n0(i int, j int) partitioned by (k string);
 
-alter table tpart add partition (k = '1') location 
'${system:test.tmp.dir}/a_uri_add_part1/';
-alter table tpart add partition (k = '2') location 
'${system:test.tmp.dir}/a_uri_add_part2/';
+alter table tpart_n0 add partition (k = '1') location 
'${system:test.tmp.dir}/a_uri_add_part1/';
+alter table tpart_n0 add partition (k = '2') location 
'${system:test.tmp.dir}/a_uri_add_part2/';
 
-select count(*) from tpart;
+select count(*) from tpart_n0;
 
-analyze table tpart partition (k) compute statistics;
+analyze table tpart_n0 partition (k) compute statistics;

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/authorization_show_grant.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/authorization_show_grant.q 
b/ql/src/test/queries/clientpositive/authorization_show_grant.q
index 0f17439..3c79db9 100644
--- a/ql/src/test/queries/clientpositive/authorization_show_grant.q
+++ b/ql/src/test/queries/clientpositive/authorization_show_grant.q
@@ -17,37 +17,37 @@ grant role roleB to role roleA;
 set user.name=user1;
 
 -- create table and grant privileges to a role
-create table t1(i int, j int, k int);
-create table t2(i int, j int, k int);
+create table t1_n15(i int, j int, k int);
+create table t2_n9(i int, j int, k int);
 
-grant select on t1 to role roleA;
-grant insert on t2 to role roleA;
-grant insert on t2 to role roleB;
+grant select on t1_n15 to role roleA;
+grant insert on t2_n9 to role roleA;
+grant insert on t2_n9 to role roleB;
 
-grant insert,delete on t1 to user userA;
-grant select,insert on t2 to user userA;
+grant insert,delete on t1_n15 to user userA;
+grant select,insert on t2_n9 to user userA;
 
 
 set user.name=hive_admin_user;
 set role admin;
 
 -- as user in admin role, it should be possible to see other users grant
-show grant user user1 on table t1;
+show grant user user1 on table t1_n15;
 show grant user user1;
-show grant role roleA on table t1;
+show grant role roleA on table t1_n15;
 show grant role roleA;
 show grant;
 
 
 set user.name=userA;
 -- user belonging to role should be able to see it
-show grant role roleA on table t1;
+show grant role roleA on table t1_n15;
 show grant role roleA;
 
-show grant role roleB on table t1;
+show grant role roleB on table t1_n15;
 show grant role roleB;
 
-show grant user userA on table t1;
+show grant user userA on table t1_n15;
 show grant user userA;
 
 

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/authorization_update.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/authorization_update.q 
b/ql/src/test/queries/clientpositive/authorization_update.q
index 5e57904..c39ffdb 100644
--- a/ql/src/test/queries/clientpositive/authorization_update.q
+++ b/ql/src/test/queries/clientpositive/authorization_update.q
@@ -11,8 +11,8 @@ set user.name=user1;
 
 CREATE TABLE t_auth_up(i int, j int) clustered by (i) into 2 buckets stored as 
orc TBLPROPERTIES ('transactional'='true');
 
-CREATE TABLE t_select(i int);
-GRANT ALL ON TABLE t_select TO ROLE public;
+CREATE TABLE t_select_n0(i int);
+GRANT ALL ON TABLE t_select_n0 TO ROLE public;
 
 -- grant update privilege to another user
 GRANT UPDATE ON t_auth_up TO USER userWIns;

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/authorization_update_own_table.q
----------------------------------------------------------------------
diff --git 
a/ql/src/test/queries/clientpositive/authorization_update_own_table.q 
b/ql/src/test/queries/clientpositive/authorization_update_own_table.q
index e3292d2..9189bf5 100644
--- a/ql/src/test/queries/clientpositive/authorization_update_own_table.q
+++ b/ql/src/test/queries/clientpositive/authorization_update_own_table.q
@@ -9,8 +9,8 @@ set 
hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
 
 
 set user.name=user1;
-create table auth_noupd(i int, j int) clustered by (i) into 2 buckets stored 
as orc TBLPROPERTIES ('transactional'='true');
-update auth_noupd set j = 0 where i > 0;
+create table auth_noupd_n0(i int, j int) clustered by (i) into 2 buckets 
stored as orc TBLPROPERTIES ('transactional'='true');
+update auth_noupd_n0 set j = 0 where i > 0;
 
 set user.name=hive_admin_user;
 set role admin;

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/authorization_view_1.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/authorization_view_1.q 
b/ql/src/test/queries/clientpositive/authorization_view_1.q
index a355d33..e987f15 100644
--- a/ql/src/test/queries/clientpositive/authorization_view_1.q
+++ b/ql/src/test/queries/clientpositive/authorization_view_1.q
@@ -1,60 +1,60 @@
 --! qt:dataset:src
 set 
hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvider;
 
-create table src_autho_test as select * from src;
+create table src_autho_test_n8 as select * from src;
 
-create view v as select * from src_autho_test;
+create view v_n9 as select * from src_autho_test_n8;
 
-create view v1 as select * from src_autho_test;
+create view v1_n13 as select * from src_autho_test_n8;
 
-create view v2 as select * from src_autho_test;
+create view v2_n7 as select * from src_autho_test_n8;
 
 set hive.security.authorization.enabled=true;
 
 --table grant to user
 
-grant select on table src_autho_test to user hive_test_user;
+grant select on table src_autho_test_n8 to user hive_test_user;
 
-grant select on table v to user hive_test_user;
-grant select on table v1 to user hive_test_user;
-grant select on table v2 to user hive_test_user;
+grant select on table v_n9 to user hive_test_user;
+grant select on table v1_n13 to user hive_test_user;
+grant select on table v2_n7 to user hive_test_user;
 
-show grant user hive_test_user on table v;
-show grant user hive_test_user on v;
-show grant user hive_test_user on v(key);
+show grant user hive_test_user on table v_n9;
+show grant user hive_test_user on v_n9;
+show grant user hive_test_user on v_n9(key);
 
-select * from v order by key limit 10;
+select * from v_n9 order by key limit 10;
 
-revoke select on table src_autho_test from user hive_test_user;
+revoke select on table src_autho_test_n8 from user hive_test_user;
 
-show grant user hive_test_user on table v;
-show grant user hive_test_user on v;
-show grant user hive_test_user on v(key);
+show grant user hive_test_user on table v_n9;
+show grant user hive_test_user on v_n9;
+show grant user hive_test_user on v_n9(key);
 
-revoke select on table v from user hive_test_user;
+revoke select on table v_n9 from user hive_test_user;
 
-show grant user hive_test_user on table v;
-show grant user hive_test_user on v;
-show grant user hive_test_user on v(key);
+show grant user hive_test_user on table v_n9;
+show grant user hive_test_user on v_n9;
+show grant user hive_test_user on v_n9(key);
 
 --column grant to user
 
-grant select on table src_autho_test to user hive_test_user;
-grant select(key) on table v to user hive_test_user;
+grant select on table src_autho_test_n8 to user hive_test_user;
+grant select(key) on table v_n9 to user hive_test_user;
 
-show grant user hive_test_user on table v;
-show grant user hive_test_user on v(key);
+show grant user hive_test_user on table v_n9;
+show grant user hive_test_user on v_n9(key);
 
-select key from v order by key limit 10;
+select key from v_n9 order by key limit 10;
 
 select key from
-(select v.key from src_autho_test join v on src_autho_test.key=v.key)subq 
+(select v_n9.key from src_autho_test_n8 join v_n9 on 
src_autho_test_n8.key=v_n9.key)subq 
 order by key limit 10;
 
 select key from
-(select key as key from src_autho_test union all select key from v)subq 
+(select key as key from src_autho_test_n8 union all select key from v_n9)subq 
 limit 10;
 
 select key from
-(select value as key from v2 union select value as key from v1 union all 
select key from v)subq
+(select value as key from v2_n7 union select value as key from v1_n13 union 
all select key from v_n9)subq
 limit 10;

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/authorization_view_2.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/authorization_view_2.q 
b/ql/src/test/queries/clientpositive/authorization_view_2.q
index 048cf6c..0cffc0c 100644
--- a/ql/src/test/queries/clientpositive/authorization_view_2.q
+++ b/ql/src/test/queries/clientpositive/authorization_view_2.q
@@ -1,17 +1,17 @@
 --! qt:dataset:src
 set 
hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvider;
 
-create table src_autho_test as select * from src;
+create table src_autho_test_n13 as select * from src;
 
-create view v1 as select * from src_autho_test;
+create view v1_n19 as select * from src_autho_test_n13;
 
-create view v2 as select * from v1;
+create view v2_n12 as select * from v1_n19;
 
 set hive.security.authorization.enabled=true;
 
 --table grant to user
 
-grant select on table v2 to user hive_test_user;
+grant select on table v2_n12 to user hive_test_user;
 
-select * from v2 order by key limit 10;
+select * from v2_n12 order by key limit 10;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/authorization_view_3.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/authorization_view_3.q 
b/ql/src/test/queries/clientpositive/authorization_view_3.q
index 31592b0..e7c4f8f 100644
--- a/ql/src/test/queries/clientpositive/authorization_view_3.q
+++ b/ql/src/test/queries/clientpositive/authorization_view_3.q
@@ -1,19 +1,19 @@
 --! qt:dataset:src
 set 
hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvider;
 
-create table src_autho_test as select * from src;
+create table src_autho_test_n1 as select * from src;
 
-create view v1 as select * from src_autho_test;
+create view v1_n2 as select * from src_autho_test_n1;
 
-create view v2 as select * from v1;
+create view v2_n0 as select * from v1_n2;
 
 set hive.security.authorization.enabled=true;
 
 --table grant to user
 
-grant select on table v2 to user hive_test_user;
+grant select on table v2_n0 to user hive_test_user;
 
-grant select(key) on table src_autho_test to user hive_test_user;
+grant select(key) on table src_autho_test_n1 to user hive_test_user;
 
-select v2.key from v2 join (select key from src_autho_test)subq on 
v2.value=subq.key order by key limit 10;
+select v2_n0.key from v2_n0 join (select key from src_autho_test_n1)subq on 
v2_n0.value=subq.key order by key limit 10;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/authorization_view_4.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/authorization_view_4.q 
b/ql/src/test/queries/clientpositive/authorization_view_4.q
index d87070d..8256bf3 100644
--- a/ql/src/test/queries/clientpositive/authorization_view_4.q
+++ b/ql/src/test/queries/clientpositive/authorization_view_4.q
@@ -1,19 +1,19 @@
 --! qt:dataset:src
 set 
hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvider;
 
-create table src_autho_test as select * from src;
+create table src_autho_test_n7 as select * from src;
 
-create view v1 as select * from src;
+create view v1_n11 as select * from src;
 
-create view v2 as select * from v1;
+create view v2_n5 as select * from v1_n11;
 
 set hive.security.authorization.enabled=true;
 
 --table grant to user
 
-grant select on table v2 to user hive_test_user;
+grant select on table v2_n5 to user hive_test_user;
 
-grant select(key) on table src_autho_test to user hive_test_user;
+grant select(key) on table src_autho_test_n7 to user hive_test_user;
 
-select v2.key from v2 join (select key from src_autho_test)subq on 
v2.value=subq.key order by key limit 10;
+select v2_n5.key from v2_n5 join (select key from src_autho_test_n7)subq on 
v2_n5.value=subq.key order by key limit 10;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/authorization_view_disable_cbo_1.q
----------------------------------------------------------------------
diff --git 
a/ql/src/test/queries/clientpositive/authorization_view_disable_cbo_1.q 
b/ql/src/test/queries/clientpositive/authorization_view_disable_cbo_1.q
index 07cd949..be50b69 100644
--- a/ql/src/test/queries/clientpositive/authorization_view_disable_cbo_1.q
+++ b/ql/src/test/queries/clientpositive/authorization_view_disable_cbo_1.q
@@ -2,70 +2,70 @@
 set 
hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvider;
 set hive.cbo.enable=false;
 
-create table src_autho_test as select * from src;
+create table src_autho_test_n9 as select * from src;
 
-create view v as select * from src_autho_test;
+create view v_n10 as select * from src_autho_test_n9;
 
-create view v1 as select * from src_autho_test;
+create view v1_n14 as select * from src_autho_test_n9;
 
-create view v2 as select * from src_autho_test;
+create view v2_n8 as select * from src_autho_test_n9;
 
 set hive.security.authorization.enabled=true;
 
 --table grant to user
 
-grant select on table src_autho_test to user hive_test_user;
+grant select on table src_autho_test_n9 to user hive_test_user;
 
-grant select on table v to user hive_test_user;
-grant select on table v1 to user hive_test_user;
-grant select on table v2 to user hive_test_user;
+grant select on table v_n10 to user hive_test_user;
+grant select on table v1_n14 to user hive_test_user;
+grant select on table v2_n8 to user hive_test_user;
 
-show grant user hive_test_user on table v;
-show grant user hive_test_user on v;
-show grant user hive_test_user on v(key);
+show grant user hive_test_user on table v_n10;
+show grant user hive_test_user on v_n10;
+show grant user hive_test_user on v_n10(key);
 
-select * from v order by key limit 10;
+select * from v_n10 order by key limit 10;
 
-revoke select on table src_autho_test from user hive_test_user;
+revoke select on table src_autho_test_n9 from user hive_test_user;
 
-show grant user hive_test_user on table v;
-show grant user hive_test_user on v;
-show grant user hive_test_user on v(key);
+show grant user hive_test_user on table v_n10;
+show grant user hive_test_user on v_n10;
+show grant user hive_test_user on v_n10(key);
 
-revoke select on table v from user hive_test_user;
+revoke select on table v_n10 from user hive_test_user;
 
-show grant user hive_test_user on table v;
-show grant user hive_test_user on v;
-show grant user hive_test_user on v(key);
+show grant user hive_test_user on table v_n10;
+show grant user hive_test_user on v_n10;
+show grant user hive_test_user on v_n10(key);
 
 --column grant to user
 
-grant select on table src_autho_test to user hive_test_user;
-grant select(key) on table v to user hive_test_user;
+grant select on table src_autho_test_n9 to user hive_test_user;
+grant select(key) on table v_n10 to user hive_test_user;
 
-show grant user hive_test_user on table v;
-show grant user hive_test_user on v(key);
+show grant user hive_test_user on table v_n10;
+show grant user hive_test_user on v_n10(key);
 
-select key from v order by key limit 10;
+select key from v_n10 order by key limit 10;
 
 select key from
-(select v.key from src_autho_test join v on src_autho_test.key=v.key)subq 
+(select v_n10.key from src_autho_test_n9 join v_n10 on 
src_autho_test_n9.key=v_n10.key)subq 
 order by key limit 10;
 
 select key from
-(select key as key from src_autho_test union all select key from v)subq 
+(select key as key from src_autho_test_n9 union all select key from v_n10)subq 
 limit 10;
 
 select key from
-(select value as key from v2 union select value as key from v1 union all 
select key from v)subq
+(select value as key from v2_n8 union select value as key from v1_n14 union 
all select key from v_n10)subq
 limit 10;
 
 set hive.cbo.enable=true;
 
 --although cbo is enabled, it will not succeed.
 
-select key from v sort by key limit 10;
+select key from v_n10 sort by key limit 10;
 
 select key from
-(select key as key from src_autho_test union all select key from v cluster by 
key)subq
+(select key as key from src_autho_test_n9 union all select key from v_n10 
cluster by key)subq
 limit 10;

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/authorization_view_disable_cbo_2.q
----------------------------------------------------------------------
diff --git 
a/ql/src/test/queries/clientpositive/authorization_view_disable_cbo_2.q 
b/ql/src/test/queries/clientpositive/authorization_view_disable_cbo_2.q
index 0b6edf1..52ac084 100644
--- a/ql/src/test/queries/clientpositive/authorization_view_disable_cbo_2.q
+++ b/ql/src/test/queries/clientpositive/authorization_view_disable_cbo_2.q
@@ -2,17 +2,17 @@
 set hive.cbo.enable=false;
 set 
hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvider;
 
-create table src_autho_test as select * from src;
+create table src_autho_test_n10 as select * from src;
 
-create view v1 as select * from src_autho_test;
+create view v1_n16 as select * from src_autho_test_n10;
 
-create view v2 as select * from v1;
+create view v2_n9 as select * from v1_n16;
 
 set hive.security.authorization.enabled=true;
 
 --table grant to user
 
-grant select on table v2 to user hive_test_user;
+grant select on table v2_n9 to user hive_test_user;
 
-select * from v2 order by key limit 10;
+select * from v2_n9 order by key limit 10;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/authorization_view_disable_cbo_3.q
----------------------------------------------------------------------
diff --git 
a/ql/src/test/queries/clientpositive/authorization_view_disable_cbo_3.q 
b/ql/src/test/queries/clientpositive/authorization_view_disable_cbo_3.q
index 34cd490..8ea9e16 100644
--- a/ql/src/test/queries/clientpositive/authorization_view_disable_cbo_3.q
+++ b/ql/src/test/queries/clientpositive/authorization_view_disable_cbo_3.q
@@ -2,11 +2,11 @@
 set hive.cbo.enable=false;
 set 
hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvider;
 
-create table src_autho_test as select * from src;
+create table src_autho_test_n0 as select * from src;
 
-create view v1 as select * from src_autho_test;
+create view v1_n1 as select * from src_autho_test_n0;
 
-create view v2 as select * from v1;
+create view v2 as select * from v1_n1;
 
 set hive.security.authorization.enabled=true;
 
@@ -14,7 +14,7 @@ set hive.security.authorization.enabled=true;
 
 grant select on table v2 to user hive_test_user;
 
-grant select(key) on table src_autho_test to user hive_test_user;
+grant select(key) on table src_autho_test_n0 to user hive_test_user;
 
-select v2.key from v2 join (select key from src_autho_test)subq on 
v2.value=subq.key order by key limit 10;
+select v2.key from v2 join (select key from src_autho_test_n0)subq on 
v2.value=subq.key order by key limit 10;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/authorization_view_disable_cbo_4.q
----------------------------------------------------------------------
diff --git 
a/ql/src/test/queries/clientpositive/authorization_view_disable_cbo_4.q 
b/ql/src/test/queries/clientpositive/authorization_view_disable_cbo_4.q
index 9953349..7d186c2 100644
--- a/ql/src/test/queries/clientpositive/authorization_view_disable_cbo_4.q
+++ b/ql/src/test/queries/clientpositive/authorization_view_disable_cbo_4.q
@@ -2,19 +2,19 @@
 set hive.cbo.enable=false;
 set 
hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvider;
 
-create table src_autho_test as select * from src;
+create table src_autho_test_n6 as select * from src;
 
-create view v1 as select * from src;
+create view v1_n10 as select * from src;
 
-create view v2 as select * from v1;
+create view v2_n4 as select * from v1_n10;
 
 set hive.security.authorization.enabled=true;
 
 --table grant to user
 
-grant select on table v2 to user hive_test_user;
+grant select on table v2_n4 to user hive_test_user;
 
-grant select(key) on table src_autho_test to user hive_test_user;
+grant select(key) on table src_autho_test_n6 to user hive_test_user;
 
-select v2.key from v2 join (select key from src_autho_test)subq on 
v2.value=subq.key order by key limit 10;
+select v2_n4.key from v2_n4 join (select key from src_autho_test_n6)subq on 
v2_n4.value=subq.key order by key limit 10;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/autoColumnStats_1.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/autoColumnStats_1.q 
b/ql/src/test/queries/clientpositive/autoColumnStats_1.q
index d584e0d..9a62127 100644
--- a/ql/src/test/queries/clientpositive/autoColumnStats_1.q
+++ b/ql/src/test/queries/clientpositive/autoColumnStats_1.q
@@ -14,188 +14,188 @@ set hive.auto.convert.join.noconditionaltask.size=10000;
 set hive.auto.convert.sortmerge.join.bigtable.selection.policy = 
org.apache.hadoop.hive.ql.optimizer.TableSizeBasedBigTableSelectorForAutoSMJ;
 set hive.optimize.bucketingsorting=false;
 
-drop table src_multi1;
+drop table src_multi1_n1;
 
-create table src_multi1 like src;
+create table src_multi1_n1 like src;
 
-insert overwrite table src_multi1 select * from src;
+insert overwrite table src_multi1_n1 select * from src;
 
-explain extended select * from src_multi1;
+explain extended select * from src_multi1_n1;
 
-describe formatted src_multi1;
+describe formatted src_multi1_n1;
 
-drop table a;
-drop table b;
-create table a like src;
-create table b like src;
+drop table a_n12;
+drop table b_n9;
+create table a_n12 like src;
+create table b_n9 like src;
 
 from src
-insert overwrite table a select *
-insert overwrite table b select *;
+insert overwrite table a_n12 select *
+insert overwrite table b_n9 select *;
 
-describe formatted a;
-describe formatted b;
+describe formatted a_n12;
+describe formatted b_n9;
 
-drop table a;
-drop table b;
-create table a like src;
-create table b like src;
+drop table a_n12;
+drop table b_n9;
+create table a_n12 like src;
+create table b_n9 like src;
 
 from src
-insert overwrite table a select *
-insert into table b select *;
+insert overwrite table a_n12 select *
+insert into table b_n9 select *;
 
-describe formatted a;
-describe formatted b;
+describe formatted a_n12;
+describe formatted b_n9;
 
 
-drop table src_multi2;
+drop table src_multi2_n2;
 
-create table src_multi2 like src;
+create table src_multi2_n2 like src;
 
-insert overwrite table src_multi2 select subq.key, src.value from (select * 
from src union select * from src1)subq join src on subq.key=src.key;
+insert overwrite table src_multi2_n2 select subq.key, src.value from (select * 
from src union select * from src1)subq join src on subq.key=src.key;
 
-describe formatted src_multi2;
+describe formatted src_multi2_n2;
 
 
-drop table nzhang_part14;
+drop table nzhang_part14_n1;
 
-create table if not exists nzhang_part14 (key string)
+create table if not exists nzhang_part14_n1 (key string)
   partitioned by (value string);
 
-desc formatted nzhang_part14;
+desc formatted nzhang_part14_n1;
 
-insert overwrite table nzhang_part14 partition(value) 
+insert overwrite table nzhang_part14_n1 partition(value) 
 select key, value from (
-  select * from (select 'k1' as key, cast(null as string) as value from src 
limit 2)a 
+  select * from (select 'k1' as key, cast(null as string) as value from src 
limit 2)a_n12 
   union all
-  select * from (select 'k2' as key, '' as value from src limit 2)b
+  select * from (select 'k2' as key, '' as value from src limit 2)b_n9
   union all 
-  select * from (select 'k3' as key, ' ' as value from src limit 2)c
+  select * from (select 'k3' as key, ' ' as value from src limit 2)c_n2
 ) T;
 
-desc formatted nzhang_part14 partition (value=' ');
+desc formatted nzhang_part14_n1 partition (value=' ');
 
-explain select key from nzhang_part14;
+explain select key from nzhang_part14_n1;
 
 
-drop table src5;
+drop table src5_n0;
 
-create table src5 as select key, value from src limit 5; 
+create table src5_n0 as select key, value from src limit 5; 
 
-insert overwrite table nzhang_part14 partition(value)
-select key, value from src5; 
+insert overwrite table nzhang_part14_n1 partition(value)
+select key, value from src5_n0; 
 
-explain select key from nzhang_part14;
+explain select key from nzhang_part14_n1;
 
 
-create table alter5 ( col1 string ) partitioned by (dt string);
+create table alter5_n0 ( col1 string ) partitioned by (dt string);
 
-alter table alter5 add partition (dt='a') location 'parta';
+alter table alter5_n0 add partition (dt='a') location 'parta';
 
-describe formatted alter5 partition (dt='a');
+describe formatted alter5_n0 partition (dt='a');
 
-insert overwrite table alter5 partition (dt='a') select key from src ;
+insert overwrite table alter5_n0 partition (dt='a') select key from src ;
 
-describe formatted alter5 partition (dt='a');
+describe formatted alter5_n0 partition (dt='a');
 
-explain select * from alter5 where dt='a';
+explain select * from alter5_n0 where dt='a';
 
 
-drop table src_stat_part;
-create table src_stat_part(key string, value string) partitioned by 
(partitionId int);
+drop table src_stat_part_n0;
+create table src_stat_part_n0(key string, value string) partitioned by 
(partitionId int);
 
-insert overwrite table src_stat_part partition (partitionId=1)
+insert overwrite table src_stat_part_n0 partition (partitionId=1)
 select * from src1 limit 5;
 
-describe formatted src_stat_part PARTITION(partitionId=1);
+describe formatted src_stat_part_n0 PARTITION(partitionId=1);
 
-insert overwrite table src_stat_part partition (partitionId=2)
+insert overwrite table src_stat_part_n0 partition (partitionId=2)
 select * from src1;
 
-describe formatted src_stat_part PARTITION(partitionId=2);
+describe formatted src_stat_part_n0 PARTITION(partitionId=2);
 
-drop table srcbucket_mapjoin;
-CREATE TABLE srcbucket_mapjoin(key int, value string) partitioned by (ds 
string) CLUSTERED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE;
-drop table tab_part;
-CREATE TABLE tab_part (key int, value string) PARTITIONED BY(ds STRING) 
CLUSTERED BY (key) SORTED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE;
-drop table srcbucket_mapjoin_part;
-CREATE TABLE srcbucket_mapjoin_part (key int, value string) partitioned by (ds 
string) CLUSTERED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE;
+drop table srcbucket_mapjoin_n6;
+CREATE TABLE srcbucket_mapjoin_n6(key int, value string) partitioned by (ds 
string) CLUSTERED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE;
+drop table tab_part_n4;
+CREATE TABLE tab_part_n4 (key int, value string) PARTITIONED BY(ds STRING) 
CLUSTERED BY (key) SORTED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE;
+drop table srcbucket_mapjoin_part_n7;
+CREATE TABLE srcbucket_mapjoin_part_n7 (key int, value string) partitioned by 
(ds string) CLUSTERED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE;
 
-load data local inpath '../../data/files/bmj/000000_0' INTO TABLE 
srcbucket_mapjoin partition(ds='2008-04-08');
-load data local inpath '../../data/files/bmj1/000001_0' INTO TABLE 
srcbucket_mapjoin partition(ds='2008-04-08');
+load data local inpath '../../data/files/bmj/000000_0' INTO TABLE 
srcbucket_mapjoin_n6 partition(ds='2008-04-08');
+load data local inpath '../../data/files/bmj1/000001_0' INTO TABLE 
srcbucket_mapjoin_n6 partition(ds='2008-04-08');
 
-load data local inpath '../../data/files/bmj/000000_0' INTO TABLE 
srcbucket_mapjoin_part partition(ds='2008-04-08');
-load data local inpath '../../data/files/bmj/000001_0' INTO TABLE 
srcbucket_mapjoin_part partition(ds='2008-04-08');
-load data local inpath '../../data/files/bmj/000002_0' INTO TABLE 
srcbucket_mapjoin_part partition(ds='2008-04-08');
-load data local inpath '../../data/files/bmj/000003_0' INTO TABLE 
srcbucket_mapjoin_part partition(ds='2008-04-08');
+load data local inpath '../../data/files/bmj/000000_0' INTO TABLE 
srcbucket_mapjoin_part_n7 partition(ds='2008-04-08');
+load data local inpath '../../data/files/bmj/000001_0' INTO TABLE 
srcbucket_mapjoin_part_n7 partition(ds='2008-04-08');
+load data local inpath '../../data/files/bmj/000002_0' INTO TABLE 
srcbucket_mapjoin_part_n7 partition(ds='2008-04-08');
+load data local inpath '../../data/files/bmj/000003_0' INTO TABLE 
srcbucket_mapjoin_part_n7 partition(ds='2008-04-08');
 
-insert overwrite table tab_part partition (ds='2008-04-08')
-select key,value from srcbucket_mapjoin_part;
+insert overwrite table tab_part_n4 partition (ds='2008-04-08')
+select key,value from srcbucket_mapjoin_part_n7;
 
-describe formatted tab_part partition (ds='2008-04-08');
+describe formatted tab_part_n4 partition (ds='2008-04-08');
 
-CREATE TABLE tab(key int, value string) PARTITIONED BY(ds STRING) CLUSTERED BY 
(key) SORTED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE;
-insert overwrite table tab partition (ds='2008-04-08')
-select key,value from srcbucket_mapjoin;
+CREATE TABLE tab_n3(key int, value string) PARTITIONED BY(ds STRING) CLUSTERED 
BY (key) SORTED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE;
+insert overwrite table tab_n3 partition (ds='2008-04-08')
+select key,value from srcbucket_mapjoin_n6;
 
-describe formatted tab partition (ds='2008-04-08');
+describe formatted tab_n3 partition (ds='2008-04-08');
 
-drop table nzhang_part14;
+drop table nzhang_part14_n1;
 
-create table if not exists nzhang_part14 (key string, value string)
+create table if not exists nzhang_part14_n1 (key string, value string)
   partitioned by (ds string, hr string);
 
-describe formatted nzhang_part14;
+describe formatted nzhang_part14_n1;
 
-insert overwrite table nzhang_part14 partition(ds, hr) 
+insert overwrite table nzhang_part14_n1 partition(ds, hr) 
 select key, value, ds, hr from (
-  select * from (select 'k1' as key, cast(null as string) as value, '1' as ds, 
'2' as hr from src limit 2)a 
+  select * from (select 'k1' as key, cast(null as string) as value, '1' as ds, 
'2' as hr from src limit 2)a_n12 
   union all
-  select * from (select 'k2' as key, '' as value, '1' as ds, '3' as hr from 
src limit 2)b
+  select * from (select 'k2' as key, '' as value, '1' as ds, '3' as hr from 
src limit 2)b_n9
   union all 
-  select * from (select 'k3' as key, ' ' as value, '2' as ds, '1' as hr from 
src limit 2)c
+  select * from (select 'k3' as key, ' ' as value, '2' as ds, '1' as hr from 
src limit 2)c_n2
 ) T;
 
-desc formatted nzhang_part14 partition(ds='1', hr='3');
+desc formatted nzhang_part14_n1 partition(ds='1', hr='3');
 
 
-INSERT OVERWRITE TABLE nzhang_part14 PARTITION (ds='2010-03-03', hr)
+INSERT OVERWRITE TABLE nzhang_part14_n1 PARTITION (ds='2010-03-03', hr)
 SELECT key, value, hr FROM srcpart WHERE ds is not null and hr>10;
 
-desc formatted nzhang_part14 PARTITION(ds='2010-03-03', hr='12');
+desc formatted nzhang_part14_n1 PARTITION(ds='2010-03-03', hr='12');
 
 
-drop table nzhang_part14;
-create table if not exists nzhang_part14 (key string, value string)
+drop table nzhang_part14_n1;
+create table if not exists nzhang_part14_n1 (key string, value string)
 partitioned by (ds string, hr string);
 
-INSERT OVERWRITE TABLE nzhang_part14 PARTITION (ds='2010-03-03', hr)
+INSERT OVERWRITE TABLE nzhang_part14_n1 PARTITION (ds='2010-03-03', hr)
 SELECT key, value, hr FROM srcpart WHERE ds is not null and hr>10;
 
-desc formatted nzhang_part14 PARTITION(ds='2010-03-03', hr='12');
+desc formatted nzhang_part14_n1 PARTITION(ds='2010-03-03', hr='12');
 
-drop table a;
-create table a (key string, value string)
+drop table a_n12;
+create table a_n12 (key string, value string)
 partitioned by (ds string, hr string);
 
-drop table b;
-create table b (key string, value string)
+drop table b_n9;
+create table b_n9 (key string, value string)
 partitioned by (ds string, hr string);
 
-drop table c;
-create table c (key string, value string)
+drop table c_n2;
+create table c_n2 (key string, value string)
 partitioned by (ds string, hr string);
 
 
 FROM srcpart 
-INSERT OVERWRITE TABLE a PARTITION (ds='2010-03-11', hr) SELECT key, value, hr 
WHERE ds is not null and hr>10
-INSERT OVERWRITE TABLE b PARTITION (ds='2010-04-11', hr) SELECT key, value, hr 
WHERE ds is not null and hr>11
-INSERT OVERWRITE TABLE c PARTITION (ds='2010-05-11', hr) SELECT key, value, hr 
WHERE hr>0;
-
-explain select key from a;
-explain select value from b;
-explain select key from b;
-explain select value from c;
-explain select key from c;
+INSERT OVERWRITE TABLE a_n12 PARTITION (ds='2010-03-11', hr) SELECT key, 
value, hr WHERE ds is not null and hr>10
+INSERT OVERWRITE TABLE b_n9 PARTITION (ds='2010-04-11', hr) SELECT key, value, 
hr WHERE ds is not null and hr>11
+INSERT OVERWRITE TABLE c_n2 PARTITION (ds='2010-05-11', hr) SELECT key, value, 
hr WHERE hr>0;
+
+explain select key from a_n12;
+explain select value from b_n9;
+explain select key from b_n9;
+explain select value from c_n2;
+explain select key from c_n2;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/38d3b8e1/ql/src/test/queries/clientpositive/autoColumnStats_10.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/autoColumnStats_10.q 
b/ql/src/test/queries/clientpositive/autoColumnStats_10.q
index bf166d8..6bfefc4 100644
--- a/ql/src/test/queries/clientpositive/autoColumnStats_10.q
+++ b/ql/src/test/queries/clientpositive/autoColumnStats_10.q
@@ -1,52 +1,52 @@
 set hive.mapred.mode=nonstrict;
 set hive.stats.column.autogather=true;
 
-drop table p;
+drop table p_n1;
 
-CREATE TABLE p(insert_num int, c1 tinyint, c2 smallint);
+CREATE TABLE p_n1(insert_num int, c1 tinyint, c2 smallint);
 
-desc formatted p;
+desc formatted p_n1;
 
-insert into p values (1,22,333);
+insert into p_n1 values (1,22,333);
 
-desc formatted p;
+desc formatted p_n1;
 
-alter table p replace columns (insert_num int, c1 STRING, c2 STRING);
+alter table p_n1 replace columns (insert_num int, c1 STRING, c2 STRING);
 
-desc formatted p;
+desc formatted p_n1;
 
-desc formatted p insert_num;
-desc formatted p c1;
+desc formatted p_n1 insert_num;
+desc formatted p_n1 c1;
 
-insert into p values (2,11,111);
+insert into p_n1 values (2,11,111);
 
-desc formatted p;
+desc formatted p_n1;
 
-desc formatted p insert_num;
-desc formatted p c1;
+desc formatted p_n1 insert_num;
+desc formatted p_n1 c1;
 
 set hive.stats.column.autogather=false;
 
-drop table p;
+drop table p_n1;
 
-CREATE TABLE p(insert_num int, c1 tinyint, c2 smallint);
+CREATE TABLE p_n1(insert_num int, c1 tinyint, c2 smallint);
 
-desc formatted p;
+desc formatted p_n1;
 
-insert into p values (1,22,333);
+insert into p_n1 values (1,22,333);
 
-desc formatted p;
+desc formatted p_n1;
 
-alter table p replace columns (insert_num int, c1 STRING, c2 STRING);
+alter table p_n1 replace columns (insert_num int, c1 STRING, c2 STRING);
 
-desc formatted p;
+desc formatted p_n1;
 
-desc formatted p insert_num;
-desc formatted p c1;
+desc formatted p_n1 insert_num;
+desc formatted p_n1 c1;
 
-insert into p values (2,11,111);
+insert into p_n1 values (2,11,111);
 
-desc formatted p;
+desc formatted p_n1;
 
-desc formatted p insert_num;
-desc formatted p c1;
+desc formatted p_n1 insert_num;
+desc formatted p_n1 c1;

Reply via email to