You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by jc...@apache.org on 2018/05/25 00:57:51 UTC
[19/58] [abbrv] [partial] hive git commit: HIVE-19617: Rename test
tables to avoid collisions during execution in batches (Jesus Camacho
Rodriguez, reviewed by Gunther Hagleitner)
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/partition_wise_fileformat3.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/partition_wise_fileformat3.q b/ql/src/test/queries/clientpositive/partition_wise_fileformat3.q
index b85fec5..1869bc1 100644
--- a/ql/src/test/queries/clientpositive/partition_wise_fileformat3.q
+++ b/ql/src/test/queries/clientpositive/partition_wise_fileformat3.q
@@ -1,18 +1,18 @@
-create table partition_test_partitioned(key string, value string) partitioned by (dt string);
+create table partition_test_partitioned_n8(key string, value string) partitioned by (dt string);
-alter table partition_test_partitioned set fileformat rcfile;
-insert overwrite table partition_test_partitioned partition(dt=101) select * from src1;
-show table extended like partition_test_partitioned partition(dt=101);
+alter table partition_test_partitioned_n8 set fileformat rcfile;
+insert overwrite table partition_test_partitioned_n8 partition(dt=101) select * from src1;
+show table extended like partition_test_partitioned_n8 partition(dt=101);
-alter table partition_test_partitioned set fileformat Sequencefile;
-insert overwrite table partition_test_partitioned partition(dt=102) select * from src1;
-show table extended like partition_test_partitioned partition(dt=102);
-select key from partition_test_partitioned where dt=102;
+alter table partition_test_partitioned_n8 set fileformat Sequencefile;
+insert overwrite table partition_test_partitioned_n8 partition(dt=102) select * from src1;
+show table extended like partition_test_partitioned_n8 partition(dt=102);
+select key from partition_test_partitioned_n8 where dt=102;
-insert overwrite table partition_test_partitioned partition(dt=101) select * from src1;
-show table extended like partition_test_partitioned partition(dt=101);
-select key from partition_test_partitioned where dt=101;
+insert overwrite table partition_test_partitioned_n8 partition(dt=101) select * from src1;
+show table extended like partition_test_partitioned_n8 partition(dt=101);
+select key from partition_test_partitioned_n8 where dt=101;
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/partition_wise_fileformat4.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/partition_wise_fileformat4.q b/ql/src/test/queries/clientpositive/partition_wise_fileformat4.q
index 33decec..f64b54e 100644
--- a/ql/src/test/queries/clientpositive/partition_wise_fileformat4.q
+++ b/ql/src/test/queries/clientpositive/partition_wise_fileformat4.q
@@ -1,8 +1,9 @@
-create table partition_test_partitioned(key string, value string) partitioned by (dt string);
-alter table partition_test_partitioned set fileformat sequencefile;
-insert overwrite table partition_test_partitioned partition(dt='1') select * from src1;
-alter table partition_test_partitioned partition (dt='1') set fileformat sequencefile;
+--! qt:dataset:src1
+create table partition_test_partitioned_n5(key string, value string) partitioned by (dt string);
+alter table partition_test_partitioned_n5 set fileformat sequencefile;
+insert overwrite table partition_test_partitioned_n5 partition(dt='1') select * from src1;
+alter table partition_test_partitioned_n5 partition (dt='1') set fileformat sequencefile;
-alter table partition_test_partitioned add partition (dt='2');
-alter table partition_test_partitioned drop partition (dt='2');
+alter table partition_test_partitioned_n5 add partition (dt='2');
+alter table partition_test_partitioned_n5 drop partition (dt='2');
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/partition_wise_fileformat5.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/partition_wise_fileformat5.q b/ql/src/test/queries/clientpositive/partition_wise_fileformat5.q
index fc3bb84..88dba6d 100644
--- a/ql/src/test/queries/clientpositive/partition_wise_fileformat5.q
+++ b/ql/src/test/queries/clientpositive/partition_wise_fileformat5.q
@@ -1,14 +1,14 @@
set hive.input.format = org.apache.hadoop.hive.ql.io.CombineHiveInputFormat;
-create table partition_test_partitioned(key string, value string) partitioned by (dt string);
+create table partition_test_partitioned_n3(key string, value string) partitioned by (dt string);
-alter table partition_test_partitioned set fileformat rcfile;
-insert overwrite table partition_test_partitioned partition(dt=101) select * from src1;
-alter table partition_test_partitioned set fileformat Sequencefile;
-insert overwrite table partition_test_partitioned partition(dt=102) select * from src1;
+alter table partition_test_partitioned_n3 set fileformat rcfile;
+insert overwrite table partition_test_partitioned_n3 partition(dt=101) select * from src1;
+alter table partition_test_partitioned_n3 set fileformat Sequencefile;
+insert overwrite table partition_test_partitioned_n3 partition(dt=102) select * from src1;
-select dt, count(1) from partition_test_partitioned where dt is not null group by dt;
+select dt, count(1) from partition_test_partitioned_n3 where dt is not null group by dt;
-insert overwrite table partition_test_partitioned partition(dt=103) select * from src1;
+insert overwrite table partition_test_partitioned_n3 partition(dt=103) select * from src1;
-select dt, count(1) from partition_test_partitioned where dt is not null group by dt;
+select dt, count(1) from partition_test_partitioned_n3 where dt is not null group by dt;
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/partition_wise_fileformat6.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/partition_wise_fileformat6.q b/ql/src/test/queries/clientpositive/partition_wise_fileformat6.q
index dac5ef2..71aa80c 100644
--- a/ql/src/test/queries/clientpositive/partition_wise_fileformat6.q
+++ b/ql/src/test/queries/clientpositive/partition_wise_fileformat6.q
@@ -1,19 +1,19 @@
set hive.input.format = org.apache.hadoop.hive.ql.io.CombineHiveInputFormat;
-create table partition_test_partitioned(key string, value string) partitioned by (dt string);
+create table partition_test_partitioned_n2(key string, value string) partitioned by (dt string);
-alter table partition_test_partitioned set fileformat rcfile;
-insert overwrite table partition_test_partitioned partition(dt=101) select * from src1;
-alter table partition_test_partitioned set fileformat Sequencefile;
+alter table partition_test_partitioned_n2 set fileformat rcfile;
+insert overwrite table partition_test_partitioned_n2 partition(dt=101) select * from src1;
+alter table partition_test_partitioned_n2 set fileformat Sequencefile;
-insert overwrite table partition_test_partitioned partition(dt=102) select * from src1;
+insert overwrite table partition_test_partitioned_n2 partition(dt=102) select * from src1;
select count(1) from
-(select key, value from partition_test_partitioned where dt=101 and key < 100
+(select key, value from partition_test_partitioned_n2 where dt=101 and key < 100
union all
-select key, value from partition_test_partitioned where dt=101 and key < 20)s;
+select key, value from partition_test_partitioned_n2 where dt=101 and key < 20)s;
select count(1) from
-(select key, value from partition_test_partitioned where dt=101 and key < 100
+(select key, value from partition_test_partitioned_n2 where dt=101 and key < 100
union all
-select key, value from partition_test_partitioned where dt=102 and key < 20)s;
+select key, value from partition_test_partitioned_n2 where dt=102 and key < 20)s;
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/partition_wise_fileformat7.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/partition_wise_fileformat7.q b/ql/src/test/queries/clientpositive/partition_wise_fileformat7.q
index c4a19ad..5fe29b0 100644
--- a/ql/src/test/queries/clientpositive/partition_wise_fileformat7.q
+++ b/ql/src/test/queries/clientpositive/partition_wise_fileformat7.q
@@ -1,12 +1,12 @@
set hive.input.format = org.apache.hadoop.hive.ql.io.CombineHiveInputFormat;
-create table partition_test_partitioned(key string, value string) partitioned by (dt string);
+create table partition_test_partitioned_n11(key string, value string) partitioned by (dt string);
-alter table partition_test_partitioned set fileformat rcfile;
-insert overwrite table partition_test_partitioned partition(dt=101) select * from src1;
+alter table partition_test_partitioned_n11 set fileformat rcfile;
+insert overwrite table partition_test_partitioned_n11 partition(dt=101) select * from src1;
-select count(1) from partition_test_partitioned a join partition_test_partitioned b on a.key = b.key
+select count(1) from partition_test_partitioned_n11 a join partition_test_partitioned_n11 b on a.key = b.key
where a.dt = '101' and b.dt = '101';
-select count(1) from partition_test_partitioned a join partition_test_partitioned b on a.key = b.key
+select count(1) from partition_test_partitioned_n11 a join partition_test_partitioned_n11 b on a.key = b.key
where a.dt = '101' and b.dt = '101' and a.key < 100;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/partition_wise_fileformat8.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/partition_wise_fileformat8.q b/ql/src/test/queries/clientpositive/partition_wise_fileformat8.q
index 46ea10f..7069483 100644
--- a/ql/src/test/queries/clientpositive/partition_wise_fileformat8.q
+++ b/ql/src/test/queries/clientpositive/partition_wise_fileformat8.q
@@ -2,12 +2,12 @@ set hive.input.format = org.apache.hadoop.hive.ql.io.CombineHiveInputFormat;
-- This tests that a query can span multiple partitions which can not only have different file formats, but
-- also different serdes
-create table partition_test_partitioned(key string, value string) partitioned by (dt string) stored as rcfile;
-insert overwrite table partition_test_partitioned partition(dt='1') select * from src;
-alter table partition_test_partitioned set fileformat sequencefile;
-insert overwrite table partition_test_partitioned partition(dt='2') select * from src;
-alter table partition_test_partitioned set serde 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe';
-insert overwrite table partition_test_partitioned partition(dt='3') select * from src;
+create table partition_test_partitioned_n0(key string, value string) partitioned by (dt string) stored as rcfile;
+insert overwrite table partition_test_partitioned_n0 partition(dt='1') select * from src;
+alter table partition_test_partitioned_n0 set fileformat sequencefile;
+insert overwrite table partition_test_partitioned_n0 partition(dt='2') select * from src;
+alter table partition_test_partitioned_n0 set serde 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe';
+insert overwrite table partition_test_partitioned_n0 partition(dt='3') select * from src;
-select * from partition_test_partitioned where dt is not null order by key, value, dt limit 20;
-select key+key as key, value, dt from partition_test_partitioned where dt is not null order by key, value, dt limit 20;
+select * from partition_test_partitioned_n0 where dt is not null order by key, value, dt limit 20;
+select key+key as key, value, dt from partition_test_partitioned_n0 where dt is not null order by key, value, dt limit 20;
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/partition_wise_fileformat9.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/partition_wise_fileformat9.q b/ql/src/test/queries/clientpositive/partition_wise_fileformat9.q
index 5205585..15e7ce5 100644
--- a/ql/src/test/queries/clientpositive/partition_wise_fileformat9.q
+++ b/ql/src/test/queries/clientpositive/partition_wise_fileformat9.q
@@ -2,11 +2,11 @@ set hive.input.format = org.apache.hadoop.hive.ql.io.CombineHiveInputFormat;
-- This tests that a query can span multiple partitions which can not only have different file formats, but
-- also different serdes
-create table partition_test_partitioned(key string, value string) partitioned by (dt string) stored as rcfile;
-insert overwrite table partition_test_partitioned partition(dt='1') select * from src;
-alter table partition_test_partitioned set serde 'org.apache.hadoop.hive.serde2.columnar.LazyBinaryColumnarSerDe';
-insert overwrite table partition_test_partitioned partition(dt='2') select * from src;
+create table partition_test_partitioned_n7(key string, value string) partitioned by (dt string) stored as rcfile;
+insert overwrite table partition_test_partitioned_n7 partition(dt='1') select * from src;
+alter table partition_test_partitioned_n7 set serde 'org.apache.hadoop.hive.serde2.columnar.LazyBinaryColumnarSerDe';
+insert overwrite table partition_test_partitioned_n7 partition(dt='2') select * from src;
-select * from partition_test_partitioned where dt is not null order by key, value, dt limit 20;
-select key+key as key, value, dt from partition_test_partitioned where dt is not null order by key, value, dt limit 20;
+select * from partition_test_partitioned_n7 where dt is not null order by key, value, dt limit 20;
+select key+key as key, value, dt from partition_test_partitioned_n7 where dt is not null order by key, value, dt limit 20;
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/partitions_json.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/partitions_json.q b/ql/src/test/queries/clientpositive/partitions_json.q
index 825e3f6..7a4a1aa 100644
--- a/ql/src/test/queries/clientpositive/partitions_json.q
+++ b/ql/src/test/queries/clientpositive/partitions_json.q
@@ -1,21 +1,21 @@
set hive.ddl.output.format=json;
-CREATE TABLE add_part_test (key STRING, value STRING) PARTITIONED BY (ds STRING);
-SHOW PARTITIONS add_part_test;
+CREATE TABLE add_part_test_n0 (key STRING, value STRING) PARTITIONED BY (ds STRING);
+SHOW PARTITIONS add_part_test_n0;
-ALTER TABLE add_part_test ADD PARTITION (ds='2010-01-01');
-SHOW PARTITIONS add_part_test;
+ALTER TABLE add_part_test_n0 ADD PARTITION (ds='2010-01-01');
+SHOW PARTITIONS add_part_test_n0;
-ALTER TABLE add_part_test ADD IF NOT EXISTS PARTITION (ds='2010-01-01');
-SHOW PARTITIONS add_part_test;
+ALTER TABLE add_part_test_n0 ADD IF NOT EXISTS PARTITION (ds='2010-01-01');
+SHOW PARTITIONS add_part_test_n0;
-ALTER TABLE add_part_test ADD IF NOT EXISTS PARTITION (ds='2010-01-02');
-SHOW PARTITIONS add_part_test;
+ALTER TABLE add_part_test_n0 ADD IF NOT EXISTS PARTITION (ds='2010-01-02');
+SHOW PARTITIONS add_part_test_n0;
-SHOW TABLE EXTENDED LIKE add_part_test PARTITION (ds='2010-01-02');
+SHOW TABLE EXTENDED LIKE add_part_test_n0 PARTITION (ds='2010-01-02');
-ALTER TABLE add_part_test DROP PARTITION (ds='2010-01-02');
+ALTER TABLE add_part_test_n0 DROP PARTITION (ds='2010-01-02');
-DROP TABLE add_part_test;
+DROP TABLE add_part_test_n0;
set hive.ddl.output.format=text;
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/pointlookup2.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/pointlookup2.q b/ql/src/test/queries/clientpositive/pointlookup2.q
index 6e1cb07..f11c2a5 100644
--- a/ql/src/test/queries/clientpositive/pointlookup2.q
+++ b/ql/src/test/queries/clientpositive/pointlookup2.q
@@ -1,71 +1,71 @@
set hive.mapred.mode=nonstrict;
-drop table pcr_t1;
-drop table pcr_t2;
+drop table pcr_t1_n2;
+drop table pcr_t2_n0;
drop table pcr_t3;
-create table pcr_t1 (key int, value string) partitioned by (ds string);
-insert overwrite table pcr_t1 partition (ds='2000-04-08') select * from src where key < 20 order by key;
-insert overwrite table pcr_t1 partition (ds='2000-04-09') select * from src where key < 20 order by key;
-insert overwrite table pcr_t1 partition (ds='2000-04-10') select * from src where key < 20 order by key;
+create table pcr_t1_n2 (key int, value string) partitioned by (ds string);
+insert overwrite table pcr_t1_n2 partition (ds='2000-04-08') select * from src where key < 20 order by key;
+insert overwrite table pcr_t1_n2 partition (ds='2000-04-09') select * from src where key < 20 order by key;
+insert overwrite table pcr_t1_n2 partition (ds='2000-04-10') select * from src where key < 20 order by key;
-create table pcr_t2 (ds string, key int, value string);
-from pcr_t1
-insert overwrite table pcr_t2 select ds, key, value where ds='2000-04-08';
-from pcr_t1
-insert overwrite table pcr_t2 select ds, key, value where ds='2000-04-08' and key=2;
+create table pcr_t2_n0 (ds string, key int, value string);
+from pcr_t1_n2
+insert overwrite table pcr_t2_n0 select ds, key, value where ds='2000-04-08';
+from pcr_t1_n2
+insert overwrite table pcr_t2_n0 select ds, key, value where ds='2000-04-08' and key=2;
explain extended
select key, value, ds
-from pcr_t1
+from pcr_t1_n2
where (ds='2000-04-08' and key=1) or (ds='2000-04-09' and key=2)
order by key, value, ds;
explain extended
select *
-from pcr_t1 t1 join pcr_t1 t2
+from pcr_t1_n2 t1 join pcr_t1_n2 t2
on t1.key=t2.key and t1.ds='2000-04-08' and t2.ds='2000-04-08'
order by t1.key;
explain extended
select *
-from pcr_t1 t1 join pcr_t1 t2
+from pcr_t1_n2 t1 join pcr_t1_n2 t2
on t1.key=t2.key and t1.ds='2000-04-08' and t2.ds='2000-04-09'
order by t1.key;
explain extended
select *
-from pcr_t1 t1 join pcr_t2 t2
+from pcr_t1_n2 t1 join pcr_t2_n0 t2
where (t1.ds='2000-04-08' and t2.key=1) or (t1.ds='2000-04-09' and t2.key=2)
order by t2.key, t2.value, t1.ds;
explain extended
select *
-from pcr_t1 t1 join pcr_t2 t2
+from pcr_t1_n2 t1 join pcr_t2_n0 t2
where (t2.ds='2000-04-08' and t1.key=1) or (t2.ds='2000-04-09' and t1.key=2)
order by t1.key, t1.value, t2.ds;
select key, value, ds
-from pcr_t1
+from pcr_t1_n2
where (ds='2000-04-08' and key=1) or (ds='2000-04-09' and key=2)
order by key, value, ds;
select *
-from pcr_t1 t1 join pcr_t1 t2
+from pcr_t1_n2 t1 join pcr_t1_n2 t2
on t1.key=t2.key and t1.ds='2000-04-08' and t2.ds='2000-04-08'
order by t1.key;
select *
-from pcr_t1 t1 join pcr_t2 t2
+from pcr_t1_n2 t1 join pcr_t2_n0 t2
where (t1.ds='2000-04-08' and t2.key=1) or (t1.ds='2000-04-09' and t2.key=2)
order by t2.key, t2.value, t1.ds;
select *
-from pcr_t1 t1 join pcr_t2 t2
+from pcr_t1_n2 t1 join pcr_t2_n0 t2
where (t1.ds='2000-04-08' and t2.key=1) or (t1.ds='2000-04-09' and t2.key=2)
order by t2.key, t2.value, t1.ds;
select *
-from pcr_t1 t1 join pcr_t2 t2
+from pcr_t1_n2 t1 join pcr_t2_n0 t2
where (t2.ds='2000-04-08' and t1.key=1) or (t2.ds='2000-04-09' and t1.key=2)
order by t1.key, t1.value, t2.ds;
@@ -74,59 +74,59 @@ set hive.optimize.partition.columns.separate=true;
explain extended
select key, value, ds
-from pcr_t1
+from pcr_t1_n2
where (ds='2000-04-08' and key=1) or (ds='2000-04-09' and key=2)
order by key, value, ds;
explain extended
select *
-from pcr_t1 t1 join pcr_t1 t2
+from pcr_t1_n2 t1 join pcr_t1_n2 t2
on t1.key=t2.key and t1.ds='2000-04-08' and t2.ds='2000-04-08'
order by t1.key;
explain extended
select *
-from pcr_t1 t1 join pcr_t1 t2
+from pcr_t1_n2 t1 join pcr_t1_n2 t2
on t1.key=t2.key and t1.ds='2000-04-08' and t2.ds='2000-04-09'
order by t1.key;
explain extended
select *
-from pcr_t1 t1 join pcr_t2 t2
+from pcr_t1_n2 t1 join pcr_t2_n0 t2
where (t1.ds='2000-04-08' and t2.key=1) or (t1.ds='2000-04-09' and t2.key=2)
order by t2.key, t2.value, t1.ds;
explain extended
select *
-from pcr_t1 t1 join pcr_t2 t2
+from pcr_t1_n2 t1 join pcr_t2_n0 t2
where (t2.ds='2000-04-08' and t1.key=1) or (t2.ds='2000-04-09' and t1.key=2)
order by t1.key, t1.value, t2.ds;
select key, value, ds
-from pcr_t1
+from pcr_t1_n2
where (ds='2000-04-08' and key=1) or (ds='2000-04-09' and key=2)
order by key, value, ds;
select *
-from pcr_t1 t1 join pcr_t1 t2
+from pcr_t1_n2 t1 join pcr_t1_n2 t2
on t1.key=t2.key and t1.ds='2000-04-08' and t2.ds='2000-04-08'
order by t1.key;
select *
-from pcr_t1 t1 join pcr_t2 t2
+from pcr_t1_n2 t1 join pcr_t2_n0 t2
where (t1.ds='2000-04-08' and t2.key=1) or (t1.ds='2000-04-09' and t2.key=2)
order by t2.key, t2.value, t1.ds;
select *
-from pcr_t1 t1 join pcr_t2 t2
+from pcr_t1_n2 t1 join pcr_t2_n0 t2
where (t1.ds='2000-04-08' and t2.key=1) or (t1.ds='2000-04-09' and t2.key=2)
order by t2.key, t2.value, t1.ds;
select *
-from pcr_t1 t1 join pcr_t2 t2
+from pcr_t1_n2 t1 join pcr_t2_n0 t2
where (t2.ds='2000-04-08' and t1.key=1) or (t2.ds='2000-04-09' and t1.key=2)
order by t1.key, t1.value, t2.ds;
-drop table pcr_t1;
-drop table pcr_t2;
+drop table pcr_t1_n2;
+drop table pcr_t2_n0;
drop table pcr_t3;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/pointlookup3.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/pointlookup3.q b/ql/src/test/queries/clientpositive/pointlookup3.q
index bb934d0..d5bee32 100644
--- a/ql/src/test/queries/clientpositive/pointlookup3.q
+++ b/ql/src/test/queries/clientpositive/pointlookup3.q
@@ -1,63 +1,63 @@
set hive.mapred.mode=nonstrict;
-drop table pcr_t1;
+drop table pcr_t1_n1;
-create table pcr_t1 (key int, value string) partitioned by (ds1 string, ds2 string);
-insert overwrite table pcr_t1 partition (ds1='2000-04-08', ds2='2001-04-08') select * from src where key < 20 order by key;
-insert overwrite table pcr_t1 partition (ds1='2000-04-09', ds2='2001-04-09') select * from src where key < 20 order by key;
-insert overwrite table pcr_t1 partition (ds1='2000-04-10', ds2='2001-04-10') select * from src where key < 20 order by key;
+create table pcr_t1_n1 (key int, value string) partitioned by (ds1 string, ds2 string);
+insert overwrite table pcr_t1_n1 partition (ds1='2000-04-08', ds2='2001-04-08') select * from src where key < 20 order by key;
+insert overwrite table pcr_t1_n1 partition (ds1='2000-04-09', ds2='2001-04-09') select * from src where key < 20 order by key;
+insert overwrite table pcr_t1_n1 partition (ds1='2000-04-10', ds2='2001-04-10') select * from src where key < 20 order by key;
explain extended
select key, value, ds1, ds2
-from pcr_t1
+from pcr_t1_n1
where (ds1='2000-04-08' and key=1) or (ds1='2000-04-09' and key=2)
order by key, value, ds1, ds2;
explain extended
select key, value, ds1, ds2
-from pcr_t1
+from pcr_t1_n1
where (ds1='2000-04-08' and ds2='2001-04-08' and key=1) or (ds1='2000-04-09' and ds2='2001-04-08' and key=2)
order by key, value, ds1, ds2;
explain extended
select *
-from pcr_t1 t1 join pcr_t1 t2
+from pcr_t1_n1 t1 join pcr_t1_n1 t2
on t1.key=t2.key and t1.ds1='2000-04-08' and t2.ds2='2001-04-08'
order by t2.key, t2.value, t1.ds1;
explain extended
select *
-from pcr_t1 t1 join pcr_t1 t2
+from pcr_t1_n1 t1 join pcr_t1_n1 t2
on t1.key=t2.key and t1.ds1='2000-04-08' and t2.ds1='2000-04-09'
order by t2.key, t2.value, t1.ds1;
explain extended
select *
-from pcr_t1 t1 join pcr_t1 t2
+from pcr_t1_n1 t1 join pcr_t1_n1 t2
where (t1.ds1='2000-04-08' and t2.key=1) or (t1.ds1='2000-04-09' and t2.key=2)
order by t2.key, t2.value, t1.ds1;
select key, value, ds1, ds2
-from pcr_t1
+from pcr_t1_n1
where (ds1='2000-04-08' and key=1) or (ds1='2000-04-09' and key=2)
order by key, value, ds1, ds2;
select key, value, ds1, ds2
-from pcr_t1
+from pcr_t1_n1
where (ds1='2000-04-08' and ds2='2001-04-08' and key=1) or (ds1='2000-04-09' and ds2='2001-04-08' and key=2)
order by key, value, ds1, ds2;
select *
-from pcr_t1 t1 join pcr_t1 t2
+from pcr_t1_n1 t1 join pcr_t1_n1 t2
on t1.key=t2.key and t1.ds1='2000-04-08' and t2.ds2='2001-04-08'
order by t2.key, t2.value, t1.ds1;
select *
-from pcr_t1 t1 join pcr_t1 t2
+from pcr_t1_n1 t1 join pcr_t1_n1 t2
on t1.key=t2.key and t1.ds1='2000-04-08' and t2.ds1='2000-04-09'
order by t2.key, t2.value, t1.ds1;
select *
-from pcr_t1 t1 join pcr_t1 t2
+from pcr_t1_n1 t1 join pcr_t1_n1 t2
where (t1.ds1='2000-04-08' and t2.key=1) or (t1.ds1='2000-04-09' and t2.key=2)
order by t2.key, t2.value, t1.ds1;
@@ -66,57 +66,57 @@ set hive.optimize.partition.columns.separate=true;
explain extended
select key, value, ds1, ds2
-from pcr_t1
+from pcr_t1_n1
where (ds1='2000-04-08' and key=1) or (ds1='2000-04-09' and key=2)
order by key, value, ds1, ds2;
explain extended
select key, value, ds1, ds2
-from pcr_t1
+from pcr_t1_n1
where (ds1='2000-04-08' and ds2='2001-04-08' and key=1) or (ds1='2000-04-09' and ds2='2001-04-08' and key=2)
order by key, value, ds1, ds2;
explain extended
select *
-from pcr_t1 t1 join pcr_t1 t2
+from pcr_t1_n1 t1 join pcr_t1_n1 t2
on t1.key=t2.key and t1.ds1='2000-04-08' and t2.ds2='2001-04-08'
order by t2.key, t2.value, t1.ds1;
explain extended
select *
-from pcr_t1 t1 join pcr_t1 t2
+from pcr_t1_n1 t1 join pcr_t1_n1 t2
on t1.key=t2.key and t1.ds1='2000-04-08' and t2.ds1='2000-04-09'
order by t2.key, t2.value, t1.ds1;
explain extended
select *
-from pcr_t1 t1 join pcr_t1 t2
+from pcr_t1_n1 t1 join pcr_t1_n1 t2
where (t1.ds1='2000-04-08' and t2.key=1) or (t1.ds1='2000-04-09' and t2.key=2)
order by t2.key, t2.value, t1.ds1;
select key, value, ds1, ds2
-from pcr_t1
+from pcr_t1_n1
where (ds1='2000-04-08' and key=1) or (ds1='2000-04-09' and key=2)
order by key, value, ds1, ds2;
select key, value, ds1, ds2
-from pcr_t1
+from pcr_t1_n1
where (ds1='2000-04-08' and ds2='2001-04-08' and key=1) or (ds1='2000-04-09' and ds2='2001-04-08' and key=2)
order by key, value, ds1, ds2;
select *
-from pcr_t1 t1 join pcr_t1 t2
+from pcr_t1_n1 t1 join pcr_t1_n1 t2
on t1.key=t2.key and t1.ds1='2000-04-08' and t2.ds2='2001-04-08'
order by t2.key, t2.value, t1.ds1;
select *
-from pcr_t1 t1 join pcr_t1 t2
+from pcr_t1_n1 t1 join pcr_t1_n1 t2
on t1.key=t2.key and t1.ds1='2000-04-08' and t2.ds1='2000-04-09'
order by t2.key, t2.value, t1.ds1;
select *
-from pcr_t1 t1 join pcr_t1 t2
+from pcr_t1_n1 t1 join pcr_t1_n1 t2
where (t1.ds1='2000-04-08' and t2.key=1) or (t1.ds1='2000-04-09' and t2.key=2)
order by t2.key, t2.value, t1.ds1;
-drop table pcr_t1;
+drop table pcr_t1_n1;
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/pointlookup4.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/pointlookup4.q b/ql/src/test/queries/clientpositive/pointlookup4.q
index ba25301..99df98e 100644
--- a/ql/src/test/queries/clientpositive/pointlookup4.q
+++ b/ql/src/test/queries/clientpositive/pointlookup4.q
@@ -1,22 +1,22 @@
set hive.mapred.mode=nonstrict;
-drop table pcr_t1;
+drop table pcr_t1_n0;
-create table pcr_t1 (key int, value string) partitioned by (ds1 string, ds2 string);
-insert overwrite table pcr_t1 partition (ds1='2000-04-08', ds2='2001-04-08') select * from src where key < 20 order by key;
-insert overwrite table pcr_t1 partition (ds1='2000-04-09', ds2='2001-04-09') select * from src where key < 20 order by key;
-insert overwrite table pcr_t1 partition (ds1='2000-04-10', ds2='2001-04-10') select * from src where key < 20 order by key;
+create table pcr_t1_n0 (key int, value string) partitioned by (ds1 string, ds2 string);
+insert overwrite table pcr_t1_n0 partition (ds1='2000-04-08', ds2='2001-04-08') select * from src where key < 20 order by key;
+insert overwrite table pcr_t1_n0 partition (ds1='2000-04-09', ds2='2001-04-09') select * from src where key < 20 order by key;
+insert overwrite table pcr_t1_n0 partition (ds1='2000-04-10', ds2='2001-04-10') select * from src where key < 20 order by key;
set hive.optimize.point.lookup=false;
set hive.optimize.partition.columns.separate=false;
explain extended
select key, value, ds1, ds2
-from pcr_t1
+from pcr_t1_n0
where (ds1='2000-04-08' and ds2='2001-04-08' and key=1) or (ds1='2000-04-09' and ds2='2001-04-09' and key=2)
order by key, value, ds1, ds2;
select key, value, ds1, ds2
-from pcr_t1
+from pcr_t1_n0
where (ds1='2000-04-08' and ds2='2001-04-08' and key=1) or (ds1='2000-04-09' and ds2='2001-04-09' and key=2)
order by key, value, ds1, ds2;
@@ -26,13 +26,13 @@ set hive.optimize.partition.columns.separate=true;
explain extended
select key, value, ds1, ds2
-from pcr_t1
+from pcr_t1_n0
where (ds1='2000-04-08' and ds2='2001-04-08' and key=1) or (ds1='2000-04-09' and ds2='2001-04-09' and key=2)
order by key, value, ds1, ds2;
select key, value, ds1, ds2
-from pcr_t1
+from pcr_t1_n0
where (ds1='2000-04-08' and ds2='2001-04-08' and key=1) or (ds1='2000-04-09' and ds2='2001-04-09' and key=2)
order by key, value, ds1, ds2;
-drop table pcr_t1;
+drop table pcr_t1_n0;
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/ppd_join5.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/ppd_join5.q b/ql/src/test/queries/clientpositive/ppd_join5.q
index f637155..9a18546 100644
--- a/ql/src/test/queries/clientpositive/ppd_join5.q
+++ b/ql/src/test/queries/clientpositive/ppd_join5.q
@@ -1,25 +1,25 @@
set hive.mapred.mode=nonstrict;
-create table t1 (id1 string, id2 string);
-create table t2 (id string, d int);
+create table t1_n79 (id1 string, id2 string);
+create table t2_n48 (id string, d int);
from src tablesample (1 rows)
- insert into table t1 select 'a','a'
- insert into table t2 select 'a',2;
+ insert into table t1_n79 select 'a','a'
+ insert into table t2_n48 select 'a',2;
explain
select a.*,b.d d1,c.d d2 from
- t1 a join t2 b on (a.id1 = b.id)
- join t2 c on (a.id2 = b.id) where b.d <= 1 and c.d <= 1;
+ t1_n79 a join t2_n48 b on (a.id1 = b.id)
+ join t2_n48 c on (a.id2 = b.id) where b.d <= 1 and c.d <= 1;
explain
select * from (
select a.*,b.d d1,c.d d2 from
- t1 a join t2 b on (a.id1 = b.id)
- join t2 c on (a.id2 = b.id) where b.d <= 1 and c.d <= 1
+ t1_n79 a join t2_n48 b on (a.id1 = b.id)
+ join t2_n48 c on (a.id2 = b.id) where b.d <= 1 and c.d <= 1
) z where d1 > 1 or d2 > 1;
select * from (
select a.*,b.d d1,c.d d2 from
- t1 a join t2 b on (a.id1 = b.id)
- join t2 c on (a.id2 = b.id) where b.d <= 1 and c.d <= 1
+ t1_n79 a join t2_n48 b on (a.id1 = b.id)
+ join t2_n48 c on (a.id2 = b.id) where b.d <= 1 and c.d <= 1
) z where d1 > 1 or d2 > 1;
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/ppd_outer_join5.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/ppd_outer_join5.q b/ql/src/test/queries/clientpositive/ppd_outer_join5.q
index cdd7db5..848bfef 100644
--- a/ql/src/test/queries/clientpositive/ppd_outer_join5.q
+++ b/ql/src/test/queries/clientpositive/ppd_outer_join5.q
@@ -2,16 +2,16 @@ set hive.mapred.mode=nonstrict;
set hive.optimize.ppd=true;
set hive.ppd.remove.duplicatefilters=true;
-create table t1 (id int, key string, value string);
-create table t2 (id int, key string, value string);
-create table t3 (id int, key string, value string);
-create table t4 (id int, key string, value string);
+create table t1_n98 (id int, key string, value string);
+create table t2_n61 (id int, key string, value string);
+create table t3_n23 (id int, key string, value string);
+create table t4_n12 (id int, key string, value string);
-explain select * from t1 full outer join t2 on t1.id=t2.id join t3 on t2.id=t3.id where t3.id=20;
-explain select * from t1 join t2 on (t1.id=t2.id) left outer join t3 on (t2.id=t3.id) where t2.id=20;
-explain select * from t1 join t2 on (t1.id=t2.id) left outer join t3 on (t1.id=t3.id) where t2.id=20;
+explain select * from t1_n98 full outer join t2_n61 on t1_n98.id=t2_n61.id join t3_n23 on t2_n61.id=t3_n23.id where t3_n23.id=20;
+explain select * from t1_n98 join t2_n61 on (t1_n98.id=t2_n61.id) left outer join t3_n23 on (t2_n61.id=t3_n23.id) where t2_n61.id=20;
+explain select * from t1_n98 join t2_n61 on (t1_n98.id=t2_n61.id) left outer join t3_n23 on (t1_n98.id=t3_n23.id) where t2_n61.id=20;
-drop table t1;
-drop table t2;
-drop table t3;
-drop table t4;
\ No newline at end of file
+drop table t1_n98;
+drop table t2_n61;
+drop table t3_n23;
+drop table t4_n12;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/ppd_repeated_alias.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/ppd_repeated_alias.q b/ql/src/test/queries/clientpositive/ppd_repeated_alias.q
index cb9039e..b94572a 100644
--- a/ql/src/test/queries/clientpositive/ppd_repeated_alias.q
+++ b/ql/src/test/queries/clientpositive/ppd_repeated_alias.q
@@ -1,13 +1,13 @@
set hive.mapred.mode=nonstrict;
-drop table pokes;
-drop table pokes2;
-create table pokes (foo int, bar int, blah int);
-create table pokes2 (foo int, bar int, blah int);
+drop table pokes_n0;
+drop table pokes2_n0;
+create table pokes_n0 (foo int, bar int, blah int);
+create table pokes2_n0 (foo int, bar int, blah int);
-- Q1: predicate should not be pushed on the right side of a left outer join
explain
SELECT a.foo as foo1, b.foo as foo2, b.bar
-FROM pokes a LEFT OUTER JOIN pokes2 b
+FROM pokes_n0 a LEFT OUTER JOIN pokes2_n0 b
ON a.foo=b.foo
WHERE b.bar=3;
@@ -15,7 +15,7 @@ WHERE b.bar=3;
explain
SELECT * FROM
(SELECT a.foo as foo1, b.foo as foo2, b.bar
- FROM pokes a LEFT OUTER JOIN pokes2 b
+ FROM pokes_n0 a LEFT OUTER JOIN pokes2_n0 b
ON a.foo=b.foo) a
WHERE a.bar=3;
@@ -23,12 +23,12 @@ WHERE a.bar=3;
explain
SELECT * FROM
(SELECT a.foo as foo1, b.foo as foo2, a.bar
- FROM pokes a JOIN pokes2 b
+ FROM pokes_n0 a JOIN pokes2_n0 b
ON a.foo=b.foo) a
WHERE a.bar=3;
-- Q4: here, the filter c.bar should be created under the first join but above the second
-explain select c.foo, d.bar from (select c.foo, b.bar, c.blah from pokes c left outer join pokes b on c.foo=b.foo) c left outer join pokes d where d.foo=1 and c.bar=2;
+explain select c.foo, d.bar from (select c.foo, b.bar, c.blah from pokes_n0 c left outer join pokes_n0 b on c.foo=b.foo) c left outer join pokes_n0 d where d.foo=1 and c.bar=2;
-drop table pokes;
-drop table pokes2;
+drop table pokes_n0;
+drop table pokes2_n0;
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/ppd_union_view.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/ppd_union_view.q b/ql/src/test/queries/clientpositive/ppd_union_view.q
index 08b4fce..40bafd1 100644
--- a/ql/src/test/queries/clientpositive/ppd_union_view.q
+++ b/ql/src/test/queries/clientpositive/ppd_union_view.q
@@ -3,12 +3,12 @@ set hive.mapred.mode=nonstrict;
drop view v;
-create table t1_new (key string, value string) partitioned by (ds string);
+create table t1_new_n0 (key string, value string) partitioned by (ds string);
-insert overwrite table t1_new partition (ds = '2011-10-15')
+insert overwrite table t1_new_n0 partition (ds = '2011-10-15')
select 'key1', 'value1' from src tablesample (1 rows);
-insert overwrite table t1_new partition (ds = '2011-10-16')
+insert overwrite table t1_new_n0 partition (ds = '2011-10-16')
select 'key2', 'value2' from src tablesample (1 rows);
create table t1_old (keymap string, value string) partitioned by (ds string);
@@ -28,10 +28,10 @@ insert overwrite table t1_mapping partition (ds = '2011-10-14')
select 'key4', 'keymap4' from src tablesample (1 rows);
-create view t1 partitioned on (ds) as
+create view t1_n113 partitioned on (ds) as
select * from
(
-select key, value, ds from t1_new
+select key, value, ds from t1_new_n0
union all
select key, value, t1_old.ds from t1_old join t1_mapping
on t1_old.keymap = t1_mapping.keymap and
@@ -39,14 +39,14 @@ on t1_old.keymap = t1_mapping.keymap and
) subq;
explain extended
-select * from t1 where ds = '2011-10-13';
+select * from t1_n113 where ds = '2011-10-13';
-select * from t1 where ds = '2011-10-13';
+select * from t1_n113 where ds = '2011-10-13';
-select * from t1 where ds = '2011-10-14';
+select * from t1_n113 where ds = '2011-10-14';
explain extended
-select * from t1 where ds = '2011-10-15';
+select * from t1_n113 where ds = '2011-10-15';
-select * from t1 where ds = '2011-10-15';
-select * from t1 where ds = '2011-10-16';
\ No newline at end of file
+select * from t1_n113 where ds = '2011-10-15';
+select * from t1_n113 where ds = '2011-10-16';
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/ppr_pushdown.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/ppr_pushdown.q b/ql/src/test/queries/clientpositive/ppr_pushdown.q
index a3e6d6e..bf54354 100644
--- a/ql/src/test/queries/clientpositive/ppr_pushdown.q
+++ b/ql/src/test/queries/clientpositive/ppr_pushdown.q
@@ -1,44 +1,44 @@
set hive.mapred.mode=nonstrict;
set hive.fetch.task.conversion=more;
-create table ppr_test (key string) partitioned by (ds string);
-
-alter table ppr_test add partition (ds = '1234');
-alter table ppr_test add partition (ds = '1224');
-alter table ppr_test add partition (ds = '1214');
-alter table ppr_test add partition (ds = '12+4');
-alter table ppr_test add partition (ds = '12.4');
-alter table ppr_test add partition (ds = '12:4');
-alter table ppr_test add partition (ds = '12%4');
-alter table ppr_test add partition (ds = '12*4');
-
-insert overwrite table ppr_test partition(ds = '1234') select * from (select '1234' from src tablesample (1 rows) union all select 'abcd' from src tablesample (1 rows)) s;
-insert overwrite table ppr_test partition(ds = '1224') select * from (select '1224' from src tablesample (1 rows) union all select 'abcd' from src tablesample (1 rows)) s;
-insert overwrite table ppr_test partition(ds = '1214') select * from (select '1214' from src tablesample (1 rows) union all select 'abcd' from src tablesample (1 rows)) s;
-insert overwrite table ppr_test partition(ds = '12+4') select * from (select '12+4' from src tablesample (1 rows) union all select 'abcd' from src tablesample (1 rows)) s;
-insert overwrite table ppr_test partition(ds = '12.4') select * from (select '12.4' from src tablesample (1 rows) union all select 'abcd' from src tablesample (1 rows)) s;
-insert overwrite table ppr_test partition(ds = '12:4') select * from (select '12:4' from src tablesample (1 rows) union all select 'abcd' from src tablesample (1 rows)) s;
-insert overwrite table ppr_test partition(ds = '12%4') select * from (select '12%4' from src tablesample (1 rows) union all select 'abcd' from src tablesample (1 rows)) s;
-insert overwrite table ppr_test partition(ds = '12*4') select * from (select '12*4' from src tablesample (1 rows) union all select 'abcd' from src tablesample (1 rows)) s;
-
-
-select * from ppr_test where ds = '1234' order by key;
-select * from ppr_test where ds = '1224' order by key;
-select * from ppr_test where ds = '1214' order by key;
-select * from ppr_test where ds = '12.4' order by key;
-select * from ppr_test where ds = '12+4' order by key;
-select * from ppr_test where ds = '12:4' order by key;
-select * from ppr_test where ds = '12%4' order by key;
-select * from ppr_test where ds = '12*4' order by key;
-select * from ppr_test where ds = '12.*4' order by key;
-
-select * from ppr_test where ds = '1234' and key = '1234';
-select * from ppr_test where ds = '1224' and key = '1224';
-select * from ppr_test where ds = '1214' and key = '1214';
-select * from ppr_test where ds = '12.4' and key = '12.4';
-select * from ppr_test where ds = '12+4' and key = '12+4';
-select * from ppr_test where ds = '12:4' and key = '12:4';
-select * from ppr_test where ds = '12%4' and key = '12%4';
-select * from ppr_test where ds = '12*4' and key = '12*4';
+create table ppr_test_n0 (key string) partitioned by (ds string);
+
+alter table ppr_test_n0 add partition (ds = '1234');
+alter table ppr_test_n0 add partition (ds = '1224');
+alter table ppr_test_n0 add partition (ds = '1214');
+alter table ppr_test_n0 add partition (ds = '12+4');
+alter table ppr_test_n0 add partition (ds = '12.4');
+alter table ppr_test_n0 add partition (ds = '12:4');
+alter table ppr_test_n0 add partition (ds = '12%4');
+alter table ppr_test_n0 add partition (ds = '12*4');
+
+insert overwrite table ppr_test_n0 partition(ds = '1234') select * from (select '1234' from src tablesample (1 rows) union all select 'abcd' from src tablesample (1 rows)) s;
+insert overwrite table ppr_test_n0 partition(ds = '1224') select * from (select '1224' from src tablesample (1 rows) union all select 'abcd' from src tablesample (1 rows)) s;
+insert overwrite table ppr_test_n0 partition(ds = '1214') select * from (select '1214' from src tablesample (1 rows) union all select 'abcd' from src tablesample (1 rows)) s;
+insert overwrite table ppr_test_n0 partition(ds = '12+4') select * from (select '12+4' from src tablesample (1 rows) union all select 'abcd' from src tablesample (1 rows)) s;
+insert overwrite table ppr_test_n0 partition(ds = '12.4') select * from (select '12.4' from src tablesample (1 rows) union all select 'abcd' from src tablesample (1 rows)) s;
+insert overwrite table ppr_test_n0 partition(ds = '12:4') select * from (select '12:4' from src tablesample (1 rows) union all select 'abcd' from src tablesample (1 rows)) s;
+insert overwrite table ppr_test_n0 partition(ds = '12%4') select * from (select '12%4' from src tablesample (1 rows) union all select 'abcd' from src tablesample (1 rows)) s;
+insert overwrite table ppr_test_n0 partition(ds = '12*4') select * from (select '12*4' from src tablesample (1 rows) union all select 'abcd' from src tablesample (1 rows)) s;
+
+
+select * from ppr_test_n0 where ds = '1234' order by key;
+select * from ppr_test_n0 where ds = '1224' order by key;
+select * from ppr_test_n0 where ds = '1214' order by key;
+select * from ppr_test_n0 where ds = '12.4' order by key;
+select * from ppr_test_n0 where ds = '12+4' order by key;
+select * from ppr_test_n0 where ds = '12:4' order by key;
+select * from ppr_test_n0 where ds = '12%4' order by key;
+select * from ppr_test_n0 where ds = '12*4' order by key;
+select * from ppr_test_n0 where ds = '12.*4' order by key;
+
+select * from ppr_test_n0 where ds = '1234' and key = '1234';
+select * from ppr_test_n0 where ds = '1224' and key = '1224';
+select * from ppr_test_n0 where ds = '1214' and key = '1214';
+select * from ppr_test_n0 where ds = '12.4' and key = '12.4';
+select * from ppr_test_n0 where ds = '12+4' and key = '12+4';
+select * from ppr_test_n0 where ds = '12:4' and key = '12:4';
+select * from ppr_test_n0 where ds = '12%4' and key = '12%4';
+select * from ppr_test_n0 where ds = '12*4' and key = '12*4';
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/primitive_types.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/primitive_types.q b/ql/src/test/queries/clientpositive/primitive_types.q
index c3fe464..bfe07fe 100644
--- a/ql/src/test/queries/clientpositive/primitive_types.q
+++ b/ql/src/test/queries/clientpositive/primitive_types.q
@@ -1,4 +1,4 @@
-create table t (
+create table t_n9 (
dp double precision,
d double,
f float,
@@ -9,5 +9,5 @@ create table t (
de dec,
dc dec(3,2)
);
-describe t;
+describe t_n9;
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/ptf.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/ptf.q b/ql/src/test/queries/clientpositive/ptf.q
index 9452536..29c09a8 100644
--- a/ql/src/test/queries/clientpositive/ptf.q
+++ b/ql/src/test/queries/clientpositive/ptf.q
@@ -282,7 +282,7 @@ order by p_name);
-- 16. testViewAsTableInputToPTF
-create view IF NOT EXISTS mfgr_price_view as
+create view IF NOT EXISTS mfgr_price_view_n5 as
select p_mfgr, p_brand,
round(sum(p_retailprice),2) as s
from part
@@ -291,20 +291,20 @@ group by p_mfgr, p_brand;
explain
select p_mfgr, p_brand, s,
round(sum(s) over w1,2) as s1
-from noop(on mfgr_price_view
+from noop(on mfgr_price_view_n5
partition by p_mfgr
order by p_mfgr)
window w1 as ( partition by p_mfgr order by p_brand rows between 2 preceding and current row);
select p_mfgr, p_brand, s,
round(sum(s) over w1,2) as s1
-from noop(on mfgr_price_view
+from noop(on mfgr_price_view_n5
partition by p_mfgr
order by p_mfgr)
window w1 as ( partition by p_mfgr order by p_brand rows between 2 preceding and current row);
-- 17. testMultipleInserts2SWQsWithPTF
-CREATE TABLE part_4(
+CREATE TABLE part_4_n2(
p_mfgr STRING,
p_name STRING,
p_size INT,
@@ -312,7 +312,7 @@ r INT,
dr INT,
s DOUBLE);
-CREATE TABLE part_5(
+CREATE TABLE part_5_n2(
p_mfgr STRING,
p_name STRING,
p_size INT,
@@ -326,11 +326,11 @@ explain
from noop(on part
partition by p_mfgr
order by p_name)
-INSERT OVERWRITE TABLE part_4 select p_mfgr, p_name, p_size,
+INSERT OVERWRITE TABLE part_4_n2 select p_mfgr, p_name, p_size,
rank() over (distribute by p_mfgr sort by p_name) as r,
dense_rank() over (distribute by p_mfgr sort by p_name) as dr,
round(sum(p_retailprice) over (distribute by p_mfgr sort by p_name rows between unbounded preceding and current row),2) as s
-INSERT OVERWRITE TABLE part_5 select p_mfgr,p_name, p_size,
+INSERT OVERWRITE TABLE part_5_n2 select p_mfgr,p_name, p_size,
round(sum(p_size) over (distribute by p_mfgr sort by p_size range between 5 preceding and current row),1) as s2,
rank() over (distribute by p_mfgr sort by p_mfgr, p_name) as r,
dense_rank() over (distribute by p_mfgr sort by p_mfgr, p_name) as dr,
@@ -341,11 +341,11 @@ window w1 as (distribute by p_mfgr sort by p_mfgr, p_name rows between 2 precedi
from noop(on part
partition by p_mfgr
order by p_name)
-INSERT OVERWRITE TABLE part_4 select p_mfgr, p_name, p_size,
+INSERT OVERWRITE TABLE part_4_n2 select p_mfgr, p_name, p_size,
rank() over (distribute by p_mfgr sort by p_name) as r,
dense_rank() over (distribute by p_mfgr sort by p_name) as dr,
round(sum(p_retailprice) over (distribute by p_mfgr sort by p_name rows between unbounded preceding and current row),2) as s
-INSERT OVERWRITE TABLE part_5 select p_mfgr,p_name, p_size,
+INSERT OVERWRITE TABLE part_5_n2 select p_mfgr,p_name, p_size,
round(sum(p_size) over (distribute by p_mfgr sort by p_size range between 5 preceding and current row),1) as s2,
rank() over (distribute by p_mfgr sort by p_mfgr, p_name) as r,
dense_rank() over (distribute by p_mfgr sort by p_mfgr, p_name) as dr,
@@ -353,9 +353,9 @@ cume_dist() over (distribute by p_mfgr sort by p_mfgr, p_name) as cud,
first_value(p_size, true) over w1 as fv1
window w1 as (distribute by p_mfgr sort by p_mfgr, p_name rows between 2 preceding and 2 following);
-select * from part_4;
+select * from part_4_n2;
-select * from part_5;
+select * from part_5_n2;
-- 18. testMulti2OperatorsFunctionChainWithMap
explain
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/ptf_matchpath.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/ptf_matchpath.q b/ql/src/test/queries/clientpositive/ptf_matchpath.q
index f769759..fa68ca5 100644
--- a/ql/src/test/queries/clientpositive/ptf_matchpath.q
+++ b/ql/src/test/queries/clientpositive/ptf_matchpath.q
@@ -1,9 +1,9 @@
set hive.vectorized.execution.enabled=false;
set hive.explain.user=false;
-DROP TABLE flights_tiny;
+DROP TABLE flights_tiny_n0;
-create table flights_tiny (
+create table flights_tiny_n0 (
ORIGIN_CITY_NAME string,
DEST_CITY_NAME string,
YEAR int,
@@ -13,7 +13,7 @@ ARR_DELAY float,
FL_NUM string
);
-LOAD DATA LOCAL INPATH '../../data/files/flights_tiny.txt' OVERWRITE INTO TABLE flights_tiny;
+LOAD DATA LOCAL INPATH '../../data/files/flights_tiny.txt' OVERWRITE INTO TABLE flights_tiny_n0;
-- SORT_QUERY_RESULTS
@@ -21,7 +21,7 @@ LOAD DATA LOCAL INPATH '../../data/files/flights_tiny.txt' OVERWRITE INTO TABLE
explain
select origin_city_name, fl_num, year, month, day_of_month, sz, tpath
from matchpath(on
- flights_tiny
+ flights_tiny_n0
distribute by fl_num
sort by year, month, day_of_month
arg1('LATE.LATE+'),
@@ -31,7 +31,7 @@ from matchpath(on
select origin_city_name, fl_num, year, month, day_of_month, sz, tpath
from matchpath(on
- flights_tiny
+ flights_tiny_n0
distribute by fl_num
sort by year, month, day_of_month
arg1('LATE.LATE+'),
@@ -43,7 +43,7 @@ from matchpath(on
explain
select origin_city_name, fl_num, year, month, day_of_month, sz, tpath
from matchpath(on
- flights_tiny
+ flights_tiny_n0
sort by fl_num, year, month, day_of_month
arg1('LATE.LATE+'),
arg2('LATE'), arg3(arr_delay > 15),
@@ -53,7 +53,7 @@ where fl_num = 1142;
select origin_city_name, fl_num, year, month, day_of_month, sz, tpath
from matchpath(on
- flights_tiny
+ flights_tiny_n0
sort by fl_num, year, month, day_of_month
arg1('LATE.LATE+'),
arg2('LATE'), arg3(arr_delay > 15),
@@ -65,7 +65,7 @@ where fl_num = 1142;
explain
select origin_city_name, fl_num, year, month, day_of_month, sz, tpath
from matchpath(on
- (select * from flights_tiny where fl_num = -1142) flights_tiny
+ (select * from flights_tiny_n0 where fl_num = -1142) flights_tiny_n0
sort by fl_num, year, month, day_of_month
arg1('LATE.LATE+'),
arg2('LATE'), arg3(arr_delay > 15),
@@ -75,7 +75,7 @@ from matchpath(on
select origin_city_name, fl_num, year, month, day_of_month, sz, tpath
from matchpath(on
- (select * from flights_tiny where fl_num = -1142) flights_tiny
+ (select * from flights_tiny_n0 where fl_num = -1142) flights_tiny_n0
sort by fl_num, year, month, day_of_month
arg1('LATE.LATE+'),
arg2('LATE'), arg3(arr_delay > 15),
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/ql_rewrite_gbtoidx.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/ql_rewrite_gbtoidx.q b/ql/src/test/queries/clientpositive/ql_rewrite_gbtoidx.q
index 240e74e..a5a8eae 100644
--- a/ql/src/test/queries/clientpositive/ql_rewrite_gbtoidx.q
+++ b/ql/src/test/queries/clientpositive/ql_rewrite_gbtoidx.q
@@ -2,8 +2,8 @@ set hive.stats.dbclass=fs;
set hive.stats.autogather=true;
set hive.cbo.enable=false;
-DROP TABLE IF EXISTS lineitem_ix;
-CREATE TABLE lineitem_ix (L_ORDERKEY INT,
+DROP TABLE IF EXISTS lineitem_ix_n1;
+CREATE TABLE lineitem_ix_n1 (L_ORDERKEY INT,
L_PARTKEY INT,
L_SUPPKEY INT,
L_LINENUMBER INT,
@@ -22,28 +22,28 @@ CREATE TABLE lineitem_ix (L_ORDERKEY INT,
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '|';
-LOAD DATA LOCAL INPATH '../../data/files/lineitem.txt' OVERWRITE INTO TABLE lineitem_ix;
+LOAD DATA LOCAL INPATH '../../data/files/lineitem.txt' OVERWRITE INTO TABLE lineitem_ix_n1;
-CREATE INDEX lineitem_ix_lshipdate_idx ON TABLE lineitem_ix(l_shipdate) AS 'org.apache.hadoop.hive.ql.index.AggregateIndexHandler' WITH DEFERRED REBUILD IDXPROPERTIES("AGGREGATES"="count(l_shipdate)");
-ALTER INDEX lineitem_ix_lshipdate_idx ON lineitem_ix REBUILD;
+CREATE INDEX lineitem_ix_lshipdate_idx ON TABLE lineitem_ix_n1(l_shipdate) AS 'org.apache.hadoop.hive.ql.index.AggregateIndexHandler' WITH DEFERRED REBUILD IDXPROPERTIES("AGGREGATES"="count(l_shipdate)");
+ALTER INDEX lineitem_ix_lshipdate_idx ON lineitem_ix_n1 REBUILD;
explain select l_shipdate, count(l_shipdate)
-from lineitem_ix
+from lineitem_ix_n1
group by l_shipdate;
select l_shipdate, count(l_shipdate)
-from lineitem_ix
+from lineitem_ix_n1
group by l_shipdate
order by l_shipdate;
set hive.optimize.index.groupby=true;
explain select l_shipdate, count(l_shipdate)
-from lineitem_ix
+from lineitem_ix_n1
group by l_shipdate;
select l_shipdate, count(l_shipdate)
-from lineitem_ix
+from lineitem_ix_n1
group by l_shipdate
order by l_shipdate;
@@ -53,14 +53,14 @@ set hive.optimize.index.groupby=false;
explain select year(l_shipdate) as year,
month(l_shipdate) as month,
count(l_shipdate) as monthly_shipments
-from lineitem_ix
+from lineitem_ix_n1
group by year(l_shipdate), month(l_shipdate)
order by year, month;
select year(l_shipdate) as year,
month(l_shipdate) as month,
count(l_shipdate) as monthly_shipments
-from lineitem_ix
+from lineitem_ix_n1
group by year(l_shipdate), month(l_shipdate)
order by year, month;
@@ -69,14 +69,14 @@ set hive.optimize.index.groupby=true;
explain select year(l_shipdate) as year,
month(l_shipdate) as month,
count(l_shipdate) as monthly_shipments
-from lineitem_ix
+from lineitem_ix_n1
group by year(l_shipdate), month(l_shipdate)
order by year, month;
select year(l_shipdate) as year,
month(l_shipdate) as month,
count(l_shipdate) as monthly_shipments
-from lineitem_ix
+from lineitem_ix_n1
group by year(l_shipdate), month(l_shipdate)
order by year, month;
@@ -87,89 +87,89 @@ lastyear.monthly_shipments as monthly_shipments_delta
from (select year(l_shipdate) as year,
month(l_shipdate) as month,
count(l_shipdate) as monthly_shipments
- from lineitem_ix
+ from lineitem_ix_n1
where year(l_shipdate) = 1997
group by year(l_shipdate), month(l_shipdate)
) lastyear join
(select year(l_shipdate) as year,
month(l_shipdate) as month,
count(l_shipdate) as monthly_shipments
- from lineitem_ix
+ from lineitem_ix_n1
where year(l_shipdate) = 1998
group by year(l_shipdate), month(l_shipdate)
) thisyear
on lastyear.month = thisyear.month;
explain select l_shipdate, cnt
-from (select l_shipdate, count(l_shipdate) as cnt from lineitem_ix group by l_shipdate
+from (select l_shipdate, count(l_shipdate) as cnt from lineitem_ix_n1 group by l_shipdate
union all
select l_shipdate, l_orderkey as cnt
-from lineitem_ix) dummy;
+from lineitem_ix_n1) dummy;
-CREATE TABLE tbl(key int, value int);
-CREATE INDEX tbl_key_idx ON TABLE tbl(key) AS 'org.apache.hadoop.hive.ql.index.AggregateIndexHandler' WITH DEFERRED REBUILD IDXPROPERTIES("AGGREGATES"="count(key)");
-ALTER INDEX tbl_key_idx ON tbl REBUILD;
+CREATE TABLE tbl_n2(key int, value int);
+CREATE INDEX tbl_key_idx ON TABLE tbl_n2(key) AS 'org.apache.hadoop.hive.ql.index.AggregateIndexHandler' WITH DEFERRED REBUILD IDXPROPERTIES("AGGREGATES"="count(key)");
+ALTER INDEX tbl_key_idx ON tbl_n2 REBUILD;
-EXPLAIN select key, count(key) from tbl where key = 1 group by key;
-EXPLAIN select key, count(key) from tbl group by key;
+EXPLAIN select key, count(key) from tbl_n2 where key = 1 group by key;
+EXPLAIN select key, count(key) from tbl_n2 group by key;
-EXPLAIN select count(1) from tbl;
-EXPLAIN select count(key) from tbl;
+EXPLAIN select count(1) from tbl_n2;
+EXPLAIN select count(key) from tbl_n2;
-EXPLAIN select key FROM tbl GROUP BY key;
-EXPLAIN select key FROM tbl GROUP BY value, key;
-EXPLAIN select key FROM tbl WHERE key = 3 GROUP BY key;
-EXPLAIN select key FROM tbl WHERE value = 2 GROUP BY key;
-EXPLAIN select key FROM tbl GROUP BY key, substr(key,2,3);
+EXPLAIN select key FROM tbl_n2 GROUP BY key;
+EXPLAIN select key FROM tbl_n2 GROUP BY value, key;
+EXPLAIN select key FROM tbl_n2 WHERE key = 3 GROUP BY key;
+EXPLAIN select key FROM tbl_n2 WHERE value = 2 GROUP BY key;
+EXPLAIN select key FROM tbl_n2 GROUP BY key, substr(key,2,3);
-EXPLAIN select key, value FROM tbl GROUP BY value, key;
-EXPLAIN select key, value FROM tbl WHERE value = 1 GROUP BY key, value;
+EXPLAIN select key, value FROM tbl_n2 GROUP BY value, key;
+EXPLAIN select key, value FROM tbl_n2 WHERE value = 1 GROUP BY key, value;
-EXPLAIN select DISTINCT key FROM tbl;
-EXPLAIN select DISTINCT key FROM tbl;
-EXPLAIN select DISTINCT key FROM tbl;
-EXPLAIN select DISTINCT key, value FROM tbl;
-EXPLAIN select DISTINCT key, value FROM tbl WHERE value = 2;
-EXPLAIN select DISTINCT key, value FROM tbl WHERE value = 2 AND key = 3;
-EXPLAIN select DISTINCT key, value FROM tbl WHERE value = key;
-EXPLAIN select DISTINCT key, substr(value,2,3) FROM tbl WHERE value = key;
-EXPLAIN select DISTINCT key, substr(value,2,3) FROM tbl;
+EXPLAIN select DISTINCT key FROM tbl_n2;
+EXPLAIN select DISTINCT key FROM tbl_n2;
+EXPLAIN select DISTINCT key FROM tbl_n2;
+EXPLAIN select DISTINCT key, value FROM tbl_n2;
+EXPLAIN select DISTINCT key, value FROM tbl_n2 WHERE value = 2;
+EXPLAIN select DISTINCT key, value FROM tbl_n2 WHERE value = 2 AND key = 3;
+EXPLAIN select DISTINCT key, value FROM tbl_n2 WHERE value = key;
+EXPLAIN select DISTINCT key, substr(value,2,3) FROM tbl_n2 WHERE value = key;
+EXPLAIN select DISTINCT key, substr(value,2,3) FROM tbl_n2;
-EXPLAIN select * FROM (select DISTINCT key, value FROM tbl) v1 WHERE v1.value = 2;
+EXPLAIN select * FROM (select DISTINCT key, value FROM tbl_n2) v1 WHERE v1.value = 2;
-DROP TABLE tbl;
+DROP TABLE tbl_n2;
-CREATE TABLE tblpart (key int, value string) PARTITIONED BY (ds string, hr int);
-INSERT OVERWRITE TABLE tblpart PARTITION (ds='2008-04-08', hr=11) SELECT key, value FROM srcpart WHERE ds = '2008-04-08' AND hr = 11;
-INSERT OVERWRITE TABLE tblpart PARTITION (ds='2008-04-08', hr=12) SELECT key, value FROM srcpart WHERE ds = '2008-04-08' AND hr = 12;
-INSERT OVERWRITE TABLE tblpart PARTITION (ds='2008-04-09', hr=11) SELECT key, value FROM srcpart WHERE ds = '2008-04-09' AND hr = 11;
-INSERT OVERWRITE TABLE tblpart PARTITION (ds='2008-04-09', hr=12) SELECT key, value FROM srcpart WHERE ds = '2008-04-09' AND hr = 12;
+CREATE TABLE tblpart_n0 (key int, value string) PARTITIONED BY (ds string, hr int);
+INSERT OVERWRITE TABLE tblpart_n0 PARTITION (ds='2008-04-08', hr=11) SELECT key, value FROM srcpart WHERE ds = '2008-04-08' AND hr = 11;
+INSERT OVERWRITE TABLE tblpart_n0 PARTITION (ds='2008-04-08', hr=12) SELECT key, value FROM srcpart WHERE ds = '2008-04-08' AND hr = 12;
+INSERT OVERWRITE TABLE tblpart_n0 PARTITION (ds='2008-04-09', hr=11) SELECT key, value FROM srcpart WHERE ds = '2008-04-09' AND hr = 11;
+INSERT OVERWRITE TABLE tblpart_n0 PARTITION (ds='2008-04-09', hr=12) SELECT key, value FROM srcpart WHERE ds = '2008-04-09' AND hr = 12;
-CREATE INDEX tbl_part_index ON TABLE tblpart(key) AS 'org.apache.hadoop.hive.ql.index.AggregateIndexHandler' WITH DEFERRED REBUILD IDXPROPERTIES("AGGREGATES"="count(key)");
+CREATE INDEX tbl_part_index ON TABLE tblpart_n0(key) AS 'org.apache.hadoop.hive.ql.index.AggregateIndexHandler' WITH DEFERRED REBUILD IDXPROPERTIES("AGGREGATES"="count(key)");
-ALTER INDEX tbl_part_index ON tblpart PARTITION (ds='2008-04-08', hr=11) REBUILD;
-EXPLAIN SELECT key, count(key) FROM tblpart WHERE ds='2008-04-09' AND hr=12 AND key < 10 GROUP BY key;
+ALTER INDEX tbl_part_index ON tblpart_n0 PARTITION (ds='2008-04-08', hr=11) REBUILD;
+EXPLAIN SELECT key, count(key) FROM tblpart_n0 WHERE ds='2008-04-09' AND hr=12 AND key < 10 GROUP BY key;
-ALTER INDEX tbl_part_index ON tblpart PARTITION (ds='2008-04-08', hr=12) REBUILD;
-ALTER INDEX tbl_part_index ON tblpart PARTITION (ds='2008-04-09', hr=11) REBUILD;
-ALTER INDEX tbl_part_index ON tblpart PARTITION (ds='2008-04-09', hr=12) REBUILD;
-EXPLAIN SELECT key, count(key) FROM tblpart WHERE ds='2008-04-09' AND hr=12 AND key < 10 GROUP BY key;
+ALTER INDEX tbl_part_index ON tblpart_n0 PARTITION (ds='2008-04-08', hr=12) REBUILD;
+ALTER INDEX tbl_part_index ON tblpart_n0 PARTITION (ds='2008-04-09', hr=11) REBUILD;
+ALTER INDEX tbl_part_index ON tblpart_n0 PARTITION (ds='2008-04-09', hr=12) REBUILD;
+EXPLAIN SELECT key, count(key) FROM tblpart_n0 WHERE ds='2008-04-09' AND hr=12 AND key < 10 GROUP BY key;
-DROP INDEX tbl_part_index on tblpart;
-DROP TABLE tblpart;
+DROP INDEX tbl_part_index on tblpart_n0;
+DROP TABLE tblpart_n0;
-CREATE TABLE tbl(key int, value int) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|';
-LOAD DATA LOCAL INPATH '../../data/files/tbl.txt' OVERWRITE INTO TABLE tbl;
+CREATE TABLE tbl_n2(key int, value int) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|';
+LOAD DATA LOCAL INPATH '../../data/files/tbl.txt' OVERWRITE INTO TABLE tbl_n2;
-CREATE INDEX tbl_key_idx ON TABLE tbl(key) AS 'org.apache.hadoop.hive.ql.index.AggregateIndexHandler' WITH DEFERRED REBUILD IDXPROPERTIES("AGGREGATES"="count(key)");
-ALTER INDEX tbl_key_idx ON tbl REBUILD;
+CREATE INDEX tbl_key_idx ON TABLE tbl_n2(key) AS 'org.apache.hadoop.hive.ql.index.AggregateIndexHandler' WITH DEFERRED REBUILD IDXPROPERTIES("AGGREGATES"="count(key)");
+ALTER INDEX tbl_key_idx ON tbl_n2 REBUILD;
set hive.optimize.index.groupby=false;
-explain select key, count(key) from tbl group by key order by key;
-select key, count(key) from tbl group by key order by key;
+explain select key, count(key) from tbl_n2 group by key order by key;
+select key, count(key) from tbl_n2 group by key order by key;
set hive.optimize.index.groupby=true;
-explain select key, count(key) from tbl group by key order by key;
-select key, count(key) from tbl group by key order by key;
-DROP TABLE tbl;
+explain select key, count(key) from tbl_n2 group by key order by key;
+select key, count(key) from tbl_n2 group by key order by key;
+DROP TABLE tbl_n2;
reset hive.cbo.enable;
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/ql_rewrite_gbtoidx_cbo_2.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/ql_rewrite_gbtoidx_cbo_2.q b/ql/src/test/queries/clientpositive/ql_rewrite_gbtoidx_cbo_2.q
index cfc5b0c..4e23d2b 100644
--- a/ql/src/test/queries/clientpositive/ql_rewrite_gbtoidx_cbo_2.q
+++ b/ql/src/test/queries/clientpositive/ql_rewrite_gbtoidx_cbo_2.q
@@ -3,12 +3,12 @@ set hive.stats.autogather=true;
set hive.cbo.enable=true;
set hive.optimize.index.groupby=true;
-DROP TABLE IF EXISTS lineitem_ix;
-DROP INDEX IF EXISTS lineitem_ix_L_ORDERKEY_idx on lineitem_ix;
-DROP INDEX IF EXISTS lineitem_ix_L_PARTKEY_idx on lineitem_ix;
+DROP TABLE IF EXISTS lineitem_ix_n0;
+DROP INDEX IF EXISTS lineitem_ix_L_ORDERKEY_idx on lineitem_ix_n0;
+DROP INDEX IF EXISTS lineitem_ix_L_PARTKEY_idx on lineitem_ix_n0;
-CREATE TABLE lineitem_ix (L_ORDERKEY INT,
+CREATE TABLE lineitem_ix_n0 (L_ORDERKEY INT,
L_PARTKEY INT,
L_SUPPKEY INT,
L_LINENUMBER INT,
@@ -27,178 +27,178 @@ CREATE TABLE lineitem_ix (L_ORDERKEY INT,
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '|';
-LOAD DATA LOCAL INPATH '../../data/files/lineitem.txt' OVERWRITE INTO TABLE lineitem_ix;
+LOAD DATA LOCAL INPATH '../../data/files/lineitem.txt' OVERWRITE INTO TABLE lineitem_ix_n0;
-CREATE INDEX lineitem_ix_L_ORDERKEY_idx ON TABLE lineitem_ix(L_ORDERKEY) AS 'org.apache.hadoop.hive.ql.index.AggregateIndexHandler' WITH DEFERRED REBUILD IDXPROPERTIES("AGGREGATES"="count(L_ORDERKEY)");
-ALTER INDEX lineitem_ix_L_ORDERKEY_idx ON lineitem_ix REBUILD;
+CREATE INDEX lineitem_ix_L_ORDERKEY_idx ON TABLE lineitem_ix_n0(L_ORDERKEY) AS 'org.apache.hadoop.hive.ql.index.AggregateIndexHandler' WITH DEFERRED REBUILD IDXPROPERTIES("AGGREGATES"="count(L_ORDERKEY)");
+ALTER INDEX lineitem_ix_L_ORDERKEY_idx ON lineitem_ix_n0 REBUILD;
-CREATE INDEX lineitem_ix_L_PARTKEY_idx ON TABLE lineitem_ix(L_PARTKEY) AS 'org.apache.hadoop.hive.ql.index.AggregateIndexHandler' WITH DEFERRED REBUILD IDXPROPERTIES("AGGREGATES"="count(L_PARTKEY)");
-ALTER INDEX lineitem_ix_L_PARTKEY_idx ON lineitem_ix REBUILD;
+CREATE INDEX lineitem_ix_L_PARTKEY_idx ON TABLE lineitem_ix_n0(L_PARTKEY) AS 'org.apache.hadoop.hive.ql.index.AggregateIndexHandler' WITH DEFERRED REBUILD IDXPROPERTIES("AGGREGATES"="count(L_PARTKEY)");
+ALTER INDEX lineitem_ix_L_PARTKEY_idx ON lineitem_ix_n0 REBUILD;
explain
select count(1)
-from lineitem_ix;
+from lineitem_ix_n0;
select count(1)
-from lineitem_ix;
+from lineitem_ix_n0;
explain
select count(L_ORDERKEY)
-from lineitem_ix;
+from lineitem_ix_n0;
select count(L_ORDERKEY)
-from lineitem_ix;
+from lineitem_ix_n0;
explain select L_ORDERKEY+L_PARTKEY as keysum,
count(L_ORDERKEY), count(L_PARTKEY)
-from lineitem_ix
+from lineitem_ix_n0
group by L_ORDERKEY, L_PARTKEY;
select L_ORDERKEY+L_PARTKEY as keysum,
count(L_ORDERKEY), count(L_PARTKEY)
-from lineitem_ix
+from lineitem_ix_n0
group by L_ORDERKEY, L_PARTKEY;
explain
select L_ORDERKEY, count(L_ORDERKEY)
-from lineitem_ix
+from lineitem_ix_n0
where L_ORDERKEY = 7
group by L_ORDERKEY;
select L_ORDERKEY, count(L_ORDERKEY)
-from lineitem_ix
+from lineitem_ix_n0
where L_ORDERKEY = 7
group by L_ORDERKEY;
explain
select L_ORDERKEY, count(1)
-from lineitem_ix
+from lineitem_ix_n0
group by L_ORDERKEY;
select L_ORDERKEY, count(1)
-from lineitem_ix
+from lineitem_ix_n0
group by L_ORDERKEY;
explain
select count(L_ORDERKEY+1)
-from lineitem_ix;
+from lineitem_ix_n0;
select count(L_ORDERKEY+1)
-from lineitem_ix;
+from lineitem_ix_n0;
explain
select L_ORDERKEY, count(L_ORDERKEY+1)
-from lineitem_ix
+from lineitem_ix_n0
group by L_ORDERKEY;
select L_ORDERKEY, count(L_ORDERKEY+1)
-from lineitem_ix
+from lineitem_ix_n0
group by L_ORDERKEY;
explain
select L_ORDERKEY, count(L_ORDERKEY+1+L_ORDERKEY+2)
-from lineitem_ix
+from lineitem_ix_n0
group by L_ORDERKEY;
select L_ORDERKEY, count(L_ORDERKEY+1+L_ORDERKEY+2)
-from lineitem_ix
+from lineitem_ix_n0
group by L_ORDERKEY;
explain
select L_ORDERKEY, count(1+L_ORDERKEY+2)
-from lineitem_ix
+from lineitem_ix_n0
group by L_ORDERKEY;
select L_ORDERKEY, count(1+L_ORDERKEY+2)
-from lineitem_ix
+from lineitem_ix_n0
group by L_ORDERKEY;
explain
select L_ORDERKEY as a, count(1) as b
-from lineitem_ix
+from lineitem_ix_n0
where L_ORDERKEY < 7
group by L_ORDERKEY;
select L_ORDERKEY as a, count(1) as b
-from lineitem_ix
+from lineitem_ix_n0
where L_ORDERKEY < 7
group by L_ORDERKEY;
explain
select L_ORDERKEY, count(keysum), sum(keysum)
from
-(select L_ORDERKEY, L_ORDERKEY+L_PARTKEY as keysum from lineitem_ix) tabA
+(select L_ORDERKEY, L_ORDERKEY+L_PARTKEY as keysum from lineitem_ix_n0) tabA
group by L_ORDERKEY;
select L_ORDERKEY, count(keysum), sum(keysum)
from
-(select L_ORDERKEY, L_ORDERKEY+L_PARTKEY as keysum from lineitem_ix) tabA
+(select L_ORDERKEY, L_ORDERKEY+L_PARTKEY as keysum from lineitem_ix_n0) tabA
group by L_ORDERKEY;
explain
select L_ORDERKEY, count(L_ORDERKEY), sum(L_ORDERKEY)
-from lineitem_ix
+from lineitem_ix_n0
group by L_ORDERKEY;
select L_ORDERKEY, count(L_ORDERKEY), sum(L_ORDERKEY)
-from lineitem_ix
+from lineitem_ix_n0
group by L_ORDERKEY;
explain
select colA, count(colA)
-from (select L_ORDERKEY as colA from lineitem_ix) tabA
+from (select L_ORDERKEY as colA from lineitem_ix_n0) tabA
group by colA;
select colA, count(colA)
-from (select L_ORDERKEY as colA from lineitem_ix) tabA
+from (select L_ORDERKEY as colA from lineitem_ix_n0) tabA
group by colA;
explain
select keysum, count(keysum)
from
-(select L_ORDERKEY+L_PARTKEY as keysum from lineitem_ix) tabA
+(select L_ORDERKEY+L_PARTKEY as keysum from lineitem_ix_n0) tabA
group by keysum;
select keysum, count(keysum)
from
-(select L_ORDERKEY+L_PARTKEY as keysum from lineitem_ix) tabA
+(select L_ORDERKEY+L_PARTKEY as keysum from lineitem_ix_n0) tabA
group by keysum;
explain
select keysum, count(keysum)
from
-(select L_ORDERKEY+1 as keysum from lineitem_ix) tabA
+(select L_ORDERKEY+1 as keysum from lineitem_ix_n0) tabA
group by keysum;
select keysum, count(keysum)
from
-(select L_ORDERKEY+1 as keysum from lineitem_ix) tabA
+(select L_ORDERKEY+1 as keysum from lineitem_ix_n0) tabA
group by keysum;
explain
select keysum, count(1)
from
-(select L_ORDERKEY+1 as keysum from lineitem_ix) tabA
+(select L_ORDERKEY+1 as keysum from lineitem_ix_n0) tabA
group by keysum;
select keysum, count(1)
from
-(select L_ORDERKEY+1 as keysum from lineitem_ix) tabA
+(select L_ORDERKEY+1 as keysum from lineitem_ix_n0) tabA
group by keysum;
explain
select keysum, count(keysum)
from
-(select L_ORDERKEY+1 as keysum from lineitem_ix where L_ORDERKEY = 7) tabA
+(select L_ORDERKEY+1 as keysum from lineitem_ix_n0 where L_ORDERKEY = 7) tabA
group by keysum;
select keysum, count(keysum)
from
-(select L_ORDERKEY+1 as keysum from lineitem_ix where L_ORDERKEY = 7) tabA
+(select L_ORDERKEY+1 as keysum from lineitem_ix_n0 where L_ORDERKEY = 7) tabA
group by keysum;
@@ -207,7 +207,7 @@ select ckeysum, count(ckeysum)
from
(select keysum, count(keysum) as ckeysum
from
- (select L_ORDERKEY+1 as keysum from lineitem_ix where L_ORDERKEY = 7) tabA
+ (select L_ORDERKEY+1 as keysum from lineitem_ix_n0 where L_ORDERKEY = 7) tabA
group by keysum) tabB
group by ckeysum;
@@ -215,7 +215,7 @@ select ckeysum, count(ckeysum)
from
(select keysum, count(keysum) as ckeysum
from
- (select L_ORDERKEY+1 as keysum from lineitem_ix where L_ORDERKEY = 7) tabA
+ (select L_ORDERKEY+1 as keysum from lineitem_ix_n0 where L_ORDERKEY = 7) tabA
group by keysum) tabB
group by ckeysum;
@@ -223,7 +223,7 @@ explain
select keysum, count(keysum) as ckeysum
from
(select L_ORDERKEY, count(L_ORDERKEY) as keysum
-from lineitem_ix
+from lineitem_ix_n0
where L_ORDERKEY < 7
group by L_ORDERKEY)tabA
group by keysum;
@@ -231,7 +231,7 @@ group by keysum;
select keysum, count(keysum) as ckeysum
from
(select L_ORDERKEY, count(L_ORDERKEY) as keysum
-from lineitem_ix
+from lineitem_ix_n0
where L_ORDERKEY < 7
group by L_ORDERKEY)tabA
group by keysum;
@@ -245,7 +245,7 @@ explain
select tabA.a, tabA.b, tabB.a, tabB.b
from
(select L_ORDERKEY as a, count(L_ORDERKEY) as b
-from lineitem_ix
+from lineitem_ix_n0
where L_ORDERKEY < 7
group by L_ORDERKEY) tabA
join
@@ -258,7 +258,7 @@ on (tabA.b=tabB.b);
select tabA.a, tabA.b, tabB.a, tabB.b
from
(select L_ORDERKEY as a, count(L_ORDERKEY) as b
-from lineitem_ix
+from lineitem_ix_n0
where L_ORDERKEY < 7
group by L_ORDERKEY) tabA
join
@@ -273,7 +273,7 @@ explain
select tabA.a, tabA.b, tabB.a, tabB.b
from
(select L_ORDERKEY as a, count(L_ORDERKEY) as b
-from lineitem_ix
+from lineitem_ix_n0
where L_ORDERKEY < 7
group by L_ORDERKEY) tabA
join
@@ -286,7 +286,7 @@ on (tabA.b=tabB.b and tabB.a < '2');
select tabA.a, tabA.b, tabB.a, tabB.b
from
(select L_ORDERKEY as a, count(L_ORDERKEY) as b
-from lineitem_ix
+from lineitem_ix_n0
where L_ORDERKEY < 7
group by L_ORDERKEY) tabA
join
@@ -297,19 +297,19 @@ group by key
on (tabA.b=tabB.b and tabB.a < '2');
EXPLAIN
-select L_ORDERKEY FROM lineitem_ix GROUP BY L_ORDERKEY, L_ORDERKEY+1;
+select L_ORDERKEY FROM lineitem_ix_n0 GROUP BY L_ORDERKEY, L_ORDERKEY+1;
-select L_ORDERKEY FROM lineitem_ix GROUP BY L_ORDERKEY, L_ORDERKEY+1;
+select L_ORDERKEY FROM lineitem_ix_n0 GROUP BY L_ORDERKEY, L_ORDERKEY+1;
EXPLAIN
-select L_ORDERKEY, L_ORDERKEY+1, count(L_ORDERKEY) FROM lineitem_ix GROUP BY L_ORDERKEY, L_ORDERKEY+1;
+select L_ORDERKEY, L_ORDERKEY+1, count(L_ORDERKEY) FROM lineitem_ix_n0 GROUP BY L_ORDERKEY, L_ORDERKEY+1;
-select L_ORDERKEY, L_ORDERKEY+1, count(L_ORDERKEY) FROM lineitem_ix GROUP BY L_ORDERKEY, L_ORDERKEY+1;
+select L_ORDERKEY, L_ORDERKEY+1, count(L_ORDERKEY) FROM lineitem_ix_n0 GROUP BY L_ORDERKEY, L_ORDERKEY+1;
EXPLAIN
-select L_ORDERKEY+2, count(L_ORDERKEY) FROM lineitem_ix GROUP BY L_ORDERKEY+2;
+select L_ORDERKEY+2, count(L_ORDERKEY) FROM lineitem_ix_n0 GROUP BY L_ORDERKEY+2;
-select L_ORDERKEY+2, count(L_ORDERKEY) FROM lineitem_ix GROUP BY L_ORDERKEY+2;
+select L_ORDERKEY+2, count(L_ORDERKEY) FROM lineitem_ix_n0 GROUP BY L_ORDERKEY+2;
--with cbo on, the following query can use idx
@@ -318,12 +318,12 @@ select b, count(b) as ckeysum
from
(
select L_ORDERKEY as a, count(L_ORDERKEY) as b
-from lineitem_ix
+from lineitem_ix_n0
where L_ORDERKEY < 7
group by L_ORDERKEY
union all
select L_PARTKEY as a, count(L_PARTKEY) as b
-from lineitem_ix
+from lineitem_ix_n0
where L_PARTKEY < 10
group by L_PARTKEY
) tabA
@@ -333,12 +333,12 @@ select b, count(b) as ckeysum
from
(
select L_ORDERKEY as a, count(L_ORDERKEY) as b
-from lineitem_ix
+from lineitem_ix_n0
where L_ORDERKEY < 7
group by L_ORDERKEY
union all
select L_PARTKEY as a, count(L_PARTKEY) as b
-from lineitem_ix
+from lineitem_ix_n0
where L_PARTKEY < 10
group by L_PARTKEY
) tabA
@@ -351,12 +351,12 @@ select a, count(a) as ckeysum
from
(
select L_ORDERKEY as a, count(L_ORDERKEY) as b
-from lineitem_ix
+from lineitem_ix_n0
where L_ORDERKEY < 7
group by L_ORDERKEY
union all
select L_PARTKEY as a, count(L_PARTKEY) as b
-from lineitem_ix
+from lineitem_ix_n0
where L_PARTKEY < 10
group by L_PARTKEY
) tabA
@@ -366,12 +366,12 @@ select a, count(a) as ckeysum
from
(
select L_ORDERKEY as a, count(L_ORDERKEY) as b
-from lineitem_ix
+from lineitem_ix_n0
where L_ORDERKEY < 7
group by L_ORDERKEY
union all
select L_PARTKEY as a, count(L_PARTKEY) as b
-from lineitem_ix
+from lineitem_ix_n0
where L_PARTKEY < 10
group by L_PARTKEY
) tabA
@@ -381,12 +381,12 @@ explain
select a, count(a)
from (
select case L_ORDERKEY when null then 1 else 1 END as a
-from lineitem_ix)tab
+from lineitem_ix_n0)tab
group by a;
select a, count(a)
from (
select case L_ORDERKEY when null then 1 else 1 END as a
-from lineitem_ix)tab
+from lineitem_ix_n0)tab
group by a;
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/quote1.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/quote1.q b/ql/src/test/queries/clientpositive/quote1.q
index e46402c..890d109 100644
--- a/ql/src/test/queries/clientpositive/quote1.q
+++ b/ql/src/test/queries/clientpositive/quote1.q
@@ -1,14 +1,14 @@
set hive.mapred.mode=nonstrict;
-CREATE TABLE dest1(`location` INT, `type` STRING) PARTITIONED BY(`table` STRING) STORED AS TEXTFILE;
+CREATE TABLE dest1_n103(`location` INT, `type` STRING) PARTITIONED BY(`table` STRING) STORED AS TEXTFILE;
EXPLAIN
FROM src
-INSERT OVERWRITE TABLE dest1 PARTITION(`table`='2008-04-08') SELECT src.key as `partition`, src.value as `from` WHERE src.key >= 200 and src.key < 300;
+INSERT OVERWRITE TABLE dest1_n103 PARTITION(`table`='2008-04-08') SELECT src.key as `partition`, src.value as `from` WHERE src.key >= 200 and src.key < 300;
EXPLAIN
-SELECT `int`.`location`, `int`.`type`, `int`.`table` FROM dest1 `int` WHERE `int`.`table` = '2008-04-08';
+SELECT `int`.`location`, `int`.`type`, `int`.`table` FROM dest1_n103 `int` WHERE `int`.`table` = '2008-04-08';
FROM src
-INSERT OVERWRITE TABLE dest1 PARTITION(`table`='2008-04-08') SELECT src.key as `partition`, src.value as `from` WHERE src.key >= 200 and src.key < 300;
+INSERT OVERWRITE TABLE dest1_n103 PARTITION(`table`='2008-04-08') SELECT src.key as `partition`, src.value as `from` WHERE src.key >= 200 and src.key < 300;
-SELECT `int`.`location`, `int`.`type`, `int`.`table` FROM dest1 `int` WHERE `int`.`table` = '2008-04-08';
+SELECT `int`.`location`, `int`.`type`, `int`.`table` FROM dest1_n103 `int` WHERE `int`.`table` = '2008-04-08';
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/quotedid_basic.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/quotedid_basic.q b/ql/src/test/queries/clientpositive/quotedid_basic.q
index a16f6f5..1e94975 100644
--- a/ql/src/test/queries/clientpositive/quotedid_basic.q
+++ b/ql/src/test/queries/clientpositive/quotedid_basic.q
@@ -3,18 +3,18 @@ set hive.mapred.mode=nonstrict;
set hive.support.quoted.identifiers=column;
-- basic
-create table t1(`x+1` string, `y&y` string, `!@#$%^&*()_q` string);
-describe t1;
-select `x+1`, `y&y`, `!@#$%^&*()_q` from t1;
-explain select `x+1`, `y&y`, `!@#$%^&*()_q` from t1;
-explain select `x+1`, `y&y`, `!@#$%^&*()_q` from t1 where `!@#$%^&*()_q` = '1';
-explain select `x+1`, `y&y`, `!@#$%^&*()_q` from t1 where `!@#$%^&*()_q` = '1' group by `x+1`, `y&y`, `!@#$%^&*()_q` having `!@#$%^&*()_q` = '1';
+create table t1_n7(`x+1` string, `y&y` string, `!@#$%^&*()_q` string);
+describe t1_n7;
+select `x+1`, `y&y`, `!@#$%^&*()_q` from t1_n7;
+explain select `x+1`, `y&y`, `!@#$%^&*()_q` from t1_n7;
+explain select `x+1`, `y&y`, `!@#$%^&*()_q` from t1_n7 where `!@#$%^&*()_q` = '1';
+explain select `x+1`, `y&y`, `!@#$%^&*()_q` from t1_n7 where `!@#$%^&*()_q` = '1' group by `x+1`, `y&y`, `!@#$%^&*()_q` having `!@#$%^&*()_q` = '1';
explain select `x+1`, `y&y`, `!@#$%^&*()_q`, rank() over(partition by `!@#$%^&*()_q` order by `y&y`)
-from t1 where `!@#$%^&*()_q` = '1' group by `x+1`, `y&y`, `!@#$%^&*()_q` having `!@#$%^&*()_q` = '1';
+from t1_n7 where `!@#$%^&*()_q` = '1' group by `x+1`, `y&y`, `!@#$%^&*()_q` having `!@#$%^&*()_q` = '1';
-- case insensitive
explain select `X+1`, `Y&y`, `!@#$%^&*()_Q`, rank() over(partition by `!@#$%^&*()_q` order by `y&y`)
-from t1 where `!@#$%^&*()_q` = '1' group by `x+1`, `y&Y`, `!@#$%^&*()_q` having `!@#$%^&*()_Q` = '1';
+from t1_n7 where `!@#$%^&*()_q` = '1' group by `x+1`, `y&Y`, `!@#$%^&*()_q` having `!@#$%^&*()_Q` = '1';
-- escaped back ticks
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/quotedid_skew.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/quotedid_skew.q b/ql/src/test/queries/clientpositive/quotedid_skew.q
index 94a2f92..34b8638 100644
--- a/ql/src/test/queries/clientpositive/quotedid_skew.q
+++ b/ql/src/test/queries/clientpositive/quotedid_skew.q
@@ -4,22 +4,22 @@ set hive.support.quoted.identifiers=column;
set hive.optimize.skewjoin.compiletime = true;
-CREATE TABLE T1(`!@#$%^&*()_q` string, `y&y` string)
+CREATE TABLE T1_n46(`!@#$%^&*()_q` string, `y&y` string)
SKEWED BY (`!@#$%^&*()_q`) ON ((2)) STORED AS TEXTFILE
;
-LOAD DATA LOCAL INPATH '../../data/files/T1.txt' INTO TABLE T1;
+LOAD DATA LOCAL INPATH '../../data/files/T1.txt' INTO TABLE T1_n46;
-CREATE TABLE T2(`!@#$%^&*()_q` string, `y&y` string)
+CREATE TABLE T2_n28(`!@#$%^&*()_q` string, `y&y` string)
SKEWED BY (`!@#$%^&*()_q`) ON ((2)) STORED AS TEXTFILE
;
-LOAD DATA LOCAL INPATH '../../data/files/T1.txt' INTO TABLE T2;
+LOAD DATA LOCAL INPATH '../../data/files/T1.txt' INTO TABLE T2_n28;
-- a simple join query with skew on both the tables on the join key
-- adding a order by at the end to make the results deterministic
EXPLAIN
-SELECT a.*, b.* FROM T1 a JOIN T2 b ON a. `!@#$%^&*()_q` = b. `!@#$%^&*()_q`
+SELECT a.*, b.* FROM T1_n46 a JOIN T2_n28 b ON a. `!@#$%^&*()_q` = b. `!@#$%^&*()_q`
;
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/quotedid_stats.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/quotedid_stats.q b/ql/src/test/queries/clientpositive/quotedid_stats.q
index 3f7e05c5..aebfeae 100644
--- a/ql/src/test/queries/clientpositive/quotedid_stats.q
+++ b/ql/src/test/queries/clientpositive/quotedid_stats.q
@@ -3,9 +3,9 @@ set hive.mapred.mode=nonstrict;
set hive.support.quoted.identifiers=column;
-- escaped back ticks
-create table t4(`x+1``` string, `y&y` string);
-describe formatted t4;
+create table t4_n9(`x+1``` string, `y&y` string);
+describe formatted t4_n9;
-analyze table t4 compute statistics for columns;
+analyze table t4_n9 compute statistics for columns;
-describe formatted t4;
+describe formatted t4_n9;
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/rand_partitionpruner2.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/rand_partitionpruner2.q b/ql/src/test/queries/clientpositive/rand_partitionpruner2.q
index e2f280e..cc099ae 100644
--- a/ql/src/test/queries/clientpositive/rand_partitionpruner2.q
+++ b/ql/src/test/queries/clientpositive/rand_partitionpruner2.q
@@ -1,14 +1,14 @@
-- scanning partitioned data
-create table tmptable(key string, value string, hr string, ds string);
+create table tmptable_n1(key string, value string, hr string, ds string);
explain extended
-insert overwrite table tmptable
+insert overwrite table tmptable_n1
select a.* from srcpart a where rand(1) < 0.1 and a.ds = '2008-04-08';
-insert overwrite table tmptable
+insert overwrite table tmptable_n1
select a.* from srcpart a where rand(1) < 0.1 and a.ds = '2008-04-08';
-select * from tmptable x sort by x.key,x.value,x.ds,x.hr;
+select * from tmptable_n1 x sort by x.key,x.value,x.ds,x.hr;
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/rcfile_merge3.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/rcfile_merge3.q b/ql/src/test/queries/clientpositive/rcfile_merge3.q
index 25d115c..df9053e 100644
--- a/ql/src/test/queries/clientpositive/rcfile_merge3.q
+++ b/ql/src/test/queries/clientpositive/rcfile_merge3.q
@@ -3,31 +3,31 @@ set hive.merge.rcfile.block.level=true;
set mapred.max.split.size=100;
set mapred.min.split.size=1;
-DROP TABLE rcfile_merge3a;
-DROP TABLE rcfile_merge3b;
+DROP TABLE rcfile_merge3a_n0;
+DROP TABLE rcfile_merge3b_n0;
-CREATE TABLE rcfile_merge3a (key int, value string)
+CREATE TABLE rcfile_merge3a_n0 (key int, value string)
PARTITIONED BY (ds string) STORED AS TEXTFILE;
-CREATE TABLE rcfile_merge3b (key int, value string) STORED AS RCFILE;
+CREATE TABLE rcfile_merge3b_n0 (key int, value string) STORED AS RCFILE;
-INSERT OVERWRITE TABLE rcfile_merge3a PARTITION (ds='1')
+INSERT OVERWRITE TABLE rcfile_merge3a_n0 PARTITION (ds='1')
SELECT * FROM src;
-INSERT OVERWRITE TABLE rcfile_merge3a PARTITION (ds='2')
+INSERT OVERWRITE TABLE rcfile_merge3a_n0 PARTITION (ds='2')
SELECT * FROM src;
-EXPLAIN INSERT OVERWRITE TABLE rcfile_merge3b
- SELECT key, value FROM rcfile_merge3a;
-INSERT OVERWRITE TABLE rcfile_merge3b
- SELECT key, value FROM rcfile_merge3a;
+EXPLAIN INSERT OVERWRITE TABLE rcfile_merge3b_n0
+ SELECT key, value FROM rcfile_merge3a_n0;
+INSERT OVERWRITE TABLE rcfile_merge3b_n0
+ SELECT key, value FROM rcfile_merge3a_n0;
SELECT SUM(HASH(c)) FROM (
SELECT TRANSFORM(key, value) USING 'tr \t _' AS (c)
- FROM rcfile_merge3a
+ FROM rcfile_merge3a_n0
) t;
SELECT SUM(HASH(c)) FROM (
SELECT TRANSFORM(key, value) USING 'tr \t _' AS (c)
- FROM rcfile_merge3b
+ FROM rcfile_merge3b_n0
) t;
-DROP TABLE rcfile_merge3a;
-DROP TABLE rcfile_merge3b;
+DROP TABLE rcfile_merge3a_n0;
+DROP TABLE rcfile_merge3b_n0;
http://git-wip-us.apache.org/repos/asf/hive/blob/9bf28a3c/ql/src/test/queries/clientpositive/rcfile_toleratecorruptions.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/rcfile_toleratecorruptions.q b/ql/src/test/queries/clientpositive/rcfile_toleratecorruptions.q
index cd3267f..c6a75b2 100644
--- a/ql/src/test/queries/clientpositive/rcfile_toleratecorruptions.q
+++ b/ql/src/test/queries/clientpositive/rcfile_toleratecorruptions.q
@@ -1,9 +1,9 @@
set hive.mapred.mode=nonstrict;
-CREATE TABLE test_src(key int, value string) stored as RCFILE;
+CREATE TABLE test_src_n3(key int, value string) stored as RCFILE;
set hive.io.rcfile.record.interval=5;
set hive.io.rcfile.record.buffer.size=100;
set hive.exec.compress.output=true;
-INSERT OVERWRITE table test_src SELECT * FROM src;
+INSERT OVERWRITE table test_src_n3 SELECT * FROM src;
set hive.io.rcfile.tolerate.corruptions=true;
-SELECT key, value FROM test_src order by key;
+SELECT key, value FROM test_src_n3 order by key;