You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2015/03/11 22:50:24 UTC
svn commit: r1666021 [2/7] - in /hive/branches/cbo: ./
common/src/java/org/apache/hadoop/hive/conf/
contrib/src/test/queries/clientnegative/
contrib/src/test/queries/clientpositive/
contrib/src/test/results/clientnegative/ contrib/src/test/results/clie...
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/dynamic_partition_pruning.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/dynamic_partition_pruning.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/dynamic_partition_pruning.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/dynamic_partition_pruning.q Wed Mar 11 21:50:22 2015
@@ -8,49 +8,49 @@ set hive.optimize.index.filter=true;
select distinct ds from srcpart;
select distinct hr from srcpart;
-EXPLAIN create table srcpart_date as select ds as ds, ds as date from srcpart group by ds;
-create table srcpart_date as select ds as ds, ds as date from srcpart group by ds;
+EXPLAIN create table srcpart_date as select ds as ds, ds as `date` from srcpart group by ds;
+create table srcpart_date as select ds as ds, ds as `date` from srcpart group by ds;
create table srcpart_hour as select hr as hr, hr as hour from srcpart group by hr;
-create table srcpart_date_hour as select ds as ds, ds as date, hr as hr, hr as hour from srcpart group by ds, hr;
+create table srcpart_date_hour as select ds as ds, ds as `date`, hr as hr, hr as hour from srcpart group by ds, hr;
create table srcpart_double_hour as select (hr*2) as hr, hr as hour from srcpart group by hr;
-- single column, single key
-EXPLAIN select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.date = '2008-04-08';
-select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.date = '2008-04-08';
+EXPLAIN select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.`date` = '2008-04-08';
+select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.`date` = '2008-04-08';
set hive.tez.dynamic.partition.pruning=false;
-EXPLAIN select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.date = '2008-04-08';
-select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.date = '2008-04-08';
+EXPLAIN select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.`date` = '2008-04-08';
+select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.`date` = '2008-04-08';
set hive.tez.dynamic.partition.pruning=true;
select count(*) from srcpart where ds = '2008-04-08';
-- multiple sources, single key
EXPLAIN select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) join srcpart_hour on (srcpart.hr = srcpart_hour.hr)
-where srcpart_date.date = '2008-04-08' and srcpart_hour.hour = 11;
+where srcpart_date.`date` = '2008-04-08' and srcpart_hour.hour = 11;
select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) join srcpart_hour on (srcpart.hr = srcpart_hour.hr)
-where srcpart_date.date = '2008-04-08' and srcpart_hour.hour = 11;
+where srcpart_date.`date` = '2008-04-08' and srcpart_hour.hour = 11;
set hive.tez.dynamic.partition.pruning=false;
EXPLAIN select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) join srcpart_hour on (srcpart.hr = srcpart_hour.hr)
-where srcpart_date.date = '2008-04-08' and srcpart_hour.hour = 11;
+where srcpart_date.`date` = '2008-04-08' and srcpart_hour.hour = 11;
select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) join srcpart_hour on (srcpart.hr = srcpart_hour.hr)
-where srcpart_date.date = '2008-04-08' and srcpart_hour.hour = 11;
+where srcpart_date.`date` = '2008-04-08' and srcpart_hour.hour = 11;
set hive.tez.dynamic.partition.pruning=true;
select count(*) from srcpart where hr = 11 and ds = '2008-04-08';
-- multiple columns single source
-EXPLAIN select count(*) from srcpart join srcpart_date_hour on (srcpart.ds = srcpart_date_hour.ds and srcpart.hr = srcpart_date_hour.hr) where srcpart_date_hour.date = '2008-04-08' and srcpart_date_hour.hour = 11;
-select count(*) from srcpart join srcpart_date_hour on (srcpart.ds = srcpart_date_hour.ds and srcpart.hr = srcpart_date_hour.hr) where srcpart_date_hour.date = '2008-04-08' and srcpart_date_hour.hour = 11;
+EXPLAIN select count(*) from srcpart join srcpart_date_hour on (srcpart.ds = srcpart_date_hour.ds and srcpart.hr = srcpart_date_hour.hr) where srcpart_date_hour.`date` = '2008-04-08' and srcpart_date_hour.hour = 11;
+select count(*) from srcpart join srcpart_date_hour on (srcpart.ds = srcpart_date_hour.ds and srcpart.hr = srcpart_date_hour.hr) where srcpart_date_hour.`date` = '2008-04-08' and srcpart_date_hour.hour = 11;
set hive.tez.dynamic.partition.pruning=false;
-EXPLAIN select count(*) from srcpart join srcpart_date_hour on (srcpart.ds = srcpart_date_hour.ds and srcpart.hr = srcpart_date_hour.hr) where srcpart_date_hour.date = '2008-04-08' and srcpart_date_hour.hour = 11;
-select count(*) from srcpart join srcpart_date_hour on (srcpart.ds = srcpart_date_hour.ds and srcpart.hr = srcpart_date_hour.hr) where srcpart_date_hour.date = '2008-04-08' and srcpart_date_hour.hour = 11;
+EXPLAIN select count(*) from srcpart join srcpart_date_hour on (srcpart.ds = srcpart_date_hour.ds and srcpart.hr = srcpart_date_hour.hr) where srcpart_date_hour.`date` = '2008-04-08' and srcpart_date_hour.hour = 11;
+select count(*) from srcpart join srcpart_date_hour on (srcpart.ds = srcpart_date_hour.ds and srcpart.hr = srcpart_date_hour.hr) where srcpart_date_hour.`date` = '2008-04-08' and srcpart_date_hour.hour = 11;
set hive.tez.dynamic.partition.pruning=true;
select count(*) from srcpart where ds = '2008-04-08' and hr = 11;
-- empty set
-EXPLAIN select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.date = 'I DONT EXIST';
-select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.date = 'I DONT EXIST';
+EXPLAIN select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.`date` = 'I DONT EXIST';
+select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.`date` = 'I DONT EXIST';
set hive.tez.dynamic.partition.pruning=false;
-EXPLAIN select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.date = 'I DONT EXIST';
-select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.date = 'I DONT EXIST';
+EXPLAIN select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.`date` = 'I DONT EXIST';
+select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.`date` = 'I DONT EXIST';
set hive.tez.dynamic.partition.pruning=true;
select count(*) from srcpart where ds = 'I DONT EXIST';
@@ -73,34 +73,34 @@ select count(*) from srcpart where cast(
-- parent is reduce tasks
-EXPLAIN select count(*) from srcpart join (select ds as ds, ds as date from srcpart group by ds) s on (srcpart.ds = s.ds) where s.date = '2008-04-08';
-select count(*) from srcpart join (select ds as ds, ds as date from srcpart group by ds) s on (srcpart.ds = s.ds) where s.date = '2008-04-08';
+EXPLAIN select count(*) from srcpart join (select ds as ds, ds as `date` from srcpart group by ds) s on (srcpart.ds = s.ds) where s.`date` = '2008-04-08';
+select count(*) from srcpart join (select ds as ds, ds as `date` from srcpart group by ds) s on (srcpart.ds = s.ds) where s.`date` = '2008-04-08';
select count(*) from srcpart where ds = '2008-04-08';
-- non-equi join
-EXPLAIN select count(*) from srcpart, srcpart_date_hour where (srcpart_date_hour.date = '2008-04-08' and srcpart_date_hour.hour = 11) and (srcpart.ds = srcpart_date_hour.ds or srcpart.hr = srcpart_date_hour.hr);
-select count(*) from srcpart, srcpart_date_hour where (srcpart_date_hour.date = '2008-04-08' and srcpart_date_hour.hour = 11) and (srcpart.ds = srcpart_date_hour.ds or srcpart.hr = srcpart_date_hour.hr);
+EXPLAIN select count(*) from srcpart, srcpart_date_hour where (srcpart_date_hour.`date` = '2008-04-08' and srcpart_date_hour.hour = 11) and (srcpart.ds = srcpart_date_hour.ds or srcpart.hr = srcpart_date_hour.hr);
+select count(*) from srcpart, srcpart_date_hour where (srcpart_date_hour.`date` = '2008-04-08' and srcpart_date_hour.hour = 11) and (srcpart.ds = srcpart_date_hour.ds or srcpart.hr = srcpart_date_hour.hr);
-- old style join syntax
-EXPLAIN select count(*) from srcpart, srcpart_date_hour where srcpart_date_hour.date = '2008-04-08' and srcpart_date_hour.hour = 11 and srcpart.ds = srcpart_date_hour.ds and srcpart.hr = srcpart_date_hour.hr;
-select count(*) from srcpart, srcpart_date_hour where srcpart_date_hour.date = '2008-04-08' and srcpart_date_hour.hour = 11 and srcpart.ds = srcpart_date_hour.ds and srcpart.hr = srcpart_date_hour.hr;
+EXPLAIN select count(*) from srcpart, srcpart_date_hour where srcpart_date_hour.`date` = '2008-04-08' and srcpart_date_hour.hour = 11 and srcpart.ds = srcpart_date_hour.ds and srcpart.hr = srcpart_date_hour.hr;
+select count(*) from srcpart, srcpart_date_hour where srcpart_date_hour.`date` = '2008-04-08' and srcpart_date_hour.hour = 11 and srcpart.ds = srcpart_date_hour.ds and srcpart.hr = srcpart_date_hour.hr;
-- left join
-EXPLAIN select count(*) from srcpart left join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.date = '2008-04-08';
-EXPLAIN select count(*) from srcpart_date left join srcpart on (srcpart.ds = srcpart_date.ds) where srcpart_date.date = '2008-04-08';
+EXPLAIN select count(*) from srcpart left join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.`date` = '2008-04-08';
+EXPLAIN select count(*) from srcpart_date left join srcpart on (srcpart.ds = srcpart_date.ds) where srcpart_date.`date` = '2008-04-08';
-- full outer
-EXPLAIN select count(*) from srcpart full outer join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.date = '2008-04-08';
+EXPLAIN select count(*) from srcpart full outer join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.`date` = '2008-04-08';
-- with static pruning
EXPLAIN select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) join srcpart_hour on (srcpart.hr = srcpart_hour.hr)
-where srcpart_date.date = '2008-04-08' and srcpart_hour.hour = 11 and srcpart.hr = 11;
+where srcpart_date.`date` = '2008-04-08' and srcpart_hour.hour = 11 and srcpart.hr = 11;
select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) join srcpart_hour on (srcpart.hr = srcpart_hour.hr)
-where srcpart_date.date = '2008-04-08' and srcpart_hour.hour = 11 and srcpart.hr = 11;
+where srcpart_date.`date` = '2008-04-08' and srcpart_hour.hour = 11 and srcpart.hr = 11;
EXPLAIN select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) join srcpart_hour on (srcpart.hr = srcpart_hour.hr)
-where srcpart_date.date = '2008-04-08' and srcpart.hr = 13;
+where srcpart_date.`date` = '2008-04-08' and srcpart.hr = 13;
select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) join srcpart_hour on (srcpart.hr = srcpart_hour.hr)
-where srcpart_date.date = '2008-04-08' and srcpart.hr = 13;
+where srcpart_date.`date` = '2008-04-08' and srcpart.hr = 13;
-- union + subquery
EXPLAIN select count(*) from srcpart where srcpart.ds in (select max(srcpart.ds) from srcpart union all select min(srcpart.ds) from srcpart);
@@ -115,26 +115,26 @@ set hive.auto.convert.join.noconditional
set hive.auto.convert.join.noconditionaltask.size = 10000000;
-- single column, single key
-EXPLAIN select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.date = '2008-04-08';
-select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.date = '2008-04-08';
+EXPLAIN select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.`date` = '2008-04-08';
+select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.`date` = '2008-04-08';
select count(*) from srcpart where ds = '2008-04-08';
-- multiple sources, single key
EXPLAIN select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) join srcpart_hour on (srcpart.hr = srcpart_hour.hr)
-where srcpart_date.date = '2008-04-08' and srcpart_hour.hour = 11;
+where srcpart_date.`date` = '2008-04-08' and srcpart_hour.hour = 11;
select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) join srcpart_hour on (srcpart.hr = srcpart_hour.hr)
-where srcpart_date.date = '2008-04-08' and srcpart_hour.hour = 11;
+where srcpart_date.`date` = '2008-04-08' and srcpart_hour.hour = 11;
select count(*) from srcpart where hr = 11 and ds = '2008-04-08';
-- multiple columns single source
-EXPLAIN select count(*) from srcpart join srcpart_date_hour on (srcpart.ds = srcpart_date_hour.ds and srcpart.hr = srcpart_date_hour.hr) where srcpart_date_hour.date = '2008-04-08' and srcpart_date_hour.hour = 11;
-select count(*) from srcpart join srcpart_date_hour on (srcpart.ds = srcpart_date_hour.ds and srcpart.hr = srcpart_date_hour.hr) where srcpart_date_hour.date = '2008-04-08' and srcpart_date_hour.hour = 11;
+EXPLAIN select count(*) from srcpart join srcpart_date_hour on (srcpart.ds = srcpart_date_hour.ds and srcpart.hr = srcpart_date_hour.hr) where srcpart_date_hour.`date` = '2008-04-08' and srcpart_date_hour.hour = 11;
+select count(*) from srcpart join srcpart_date_hour on (srcpart.ds = srcpart_date_hour.ds and srcpart.hr = srcpart_date_hour.hr) where srcpart_date_hour.`date` = '2008-04-08' and srcpart_date_hour.hour = 11;
select count(*) from srcpart where ds = '2008-04-08' and hr = 11;
-- empty set
-EXPLAIN select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.date = 'I DONT EXIST';
+EXPLAIN select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.`date` = 'I DONT EXIST';
-- Disabled until TEZ-1486 is fixed
--- select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.date = 'I DONT EXIST';
+-- select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.`date` = 'I DONT EXIST';
-- expressions
EXPLAIN select count(*) from srcpart join srcpart_double_hour on (srcpart.hr = cast(srcpart_double_hour.hr/2 as int)) where srcpart_double_hour.hour = 11;
@@ -144,27 +144,27 @@ select count(*) from srcpart join srcpar
select count(*) from srcpart where hr = 11;
-- parent is reduce tasks
-EXPLAIN select count(*) from srcpart join (select ds as ds, ds as date from srcpart group by ds) s on (srcpart.ds = s.ds) where s.date = '2008-04-08';
-select count(*) from srcpart join (select ds as ds, ds as date from srcpart group by ds) s on (srcpart.ds = s.ds) where s.date = '2008-04-08';
+EXPLAIN select count(*) from srcpart join (select ds as ds, ds as `date` from srcpart group by ds) s on (srcpart.ds = s.ds) where s.`date` = '2008-04-08';
+select count(*) from srcpart join (select ds as ds, ds as `date` from srcpart group by ds) s on (srcpart.ds = s.ds) where s.`date` = '2008-04-08';
select count(*) from srcpart where ds = '2008-04-08';
-- left join
-EXPLAIN select count(*) from srcpart left join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.date = '2008-04-08';
-EXPLAIN select count(*) from srcpart_date left join srcpart on (srcpart.ds = srcpart_date.ds) where srcpart_date.date = '2008-04-08';
+EXPLAIN select count(*) from srcpart left join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.`date` = '2008-04-08';
+EXPLAIN select count(*) from srcpart_date left join srcpart on (srcpart.ds = srcpart_date.ds) where srcpart_date.`date` = '2008-04-08';
-- full outer
-EXPLAIN select count(*) from srcpart full outer join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.date = '2008-04-08';
+EXPLAIN select count(*) from srcpart full outer join srcpart_date on (srcpart.ds = srcpart_date.ds) where srcpart_date.`date` = '2008-04-08';
-- with static pruning
EXPLAIN select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) join srcpart_hour on (srcpart.hr = srcpart_hour.hr)
-where srcpart_date.date = '2008-04-08' and srcpart_hour.hour = 11 and srcpart.hr = 11;
+where srcpart_date.`date` = '2008-04-08' and srcpart_hour.hour = 11 and srcpart.hr = 11;
select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) join srcpart_hour on (srcpart.hr = srcpart_hour.hr)
-where srcpart_date.date = '2008-04-08' and srcpart_hour.hour = 11 and srcpart.hr = 11;
+where srcpart_date.`date` = '2008-04-08' and srcpart_hour.hour = 11 and srcpart.hr = 11;
EXPLAIN select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) join srcpart_hour on (srcpart.hr = srcpart_hour.hr)
-where srcpart_date.date = '2008-04-08' and srcpart.hr = 13;
+where srcpart_date.`date` = '2008-04-08' and srcpart.hr = 13;
-- Disabled until TEZ-1486 is fixed
-- select count(*) from srcpart join srcpart_date on (srcpart.ds = srcpart_date.ds) join srcpart_hour on (srcpart.hr = srcpart_hour.hr)
--- where srcpart_date.date = '2008-04-08' and srcpart.hr = 13;
+-- where srcpart_date.`date` = '2008-04-08' and srcpart.hr = 13;
-- union + subquery
EXPLAIN select distinct(ds) from srcpart where srcpart.ds in (select max(srcpart.ds) from srcpart union all select min(srcpart.ds) from srcpart);
@@ -180,8 +180,8 @@ set hive.vectorized.execution.enabled=fa
set hive.exec.max.dynamic.partitions=1000;
insert into table srcpart_orc partition (ds, hr) select key, value, ds, hr from srcpart;
-EXPLAIN select count(*) from srcpart_orc join srcpart_date_hour on (srcpart_orc.ds = srcpart_date_hour.ds and srcpart_orc.hr = srcpart_date_hour.hr) where srcpart_date_hour.hour = 11 and (srcpart_date_hour.date = '2008-04-08' or srcpart_date_hour.date = '2008-04-09');
-select count(*) from srcpart_orc join srcpart_date_hour on (srcpart_orc.ds = srcpart_date_hour.ds and srcpart_orc.hr = srcpart_date_hour.hr) where srcpart_date_hour.hour = 11 and (srcpart_date_hour.date = '2008-04-08' or srcpart_date_hour.date = '2008-04-09');
+EXPLAIN select count(*) from srcpart_orc join srcpart_date_hour on (srcpart_orc.ds = srcpart_date_hour.ds and srcpart_orc.hr = srcpart_date_hour.hr) where srcpart_date_hour.hour = 11 and (srcpart_date_hour.`date` = '2008-04-08' or srcpart_date_hour.`date` = '2008-04-09');
+select count(*) from srcpart_orc join srcpart_date_hour on (srcpart_orc.ds = srcpart_date_hour.ds and srcpart_orc.hr = srcpart_date_hour.hr) where srcpart_date_hour.hour = 11 and (srcpart_date_hour.`date` = '2008-04-08' or srcpart_date_hour.`date` = '2008-04-09');
select count(*) from srcpart where (ds = '2008-04-08' or ds = '2008-04-09') and hr = 11;
drop table srcpart_orc;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/innerjoin.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/innerjoin.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/innerjoin.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/innerjoin.q Wed Mar 11 21:50:22 2015
@@ -14,13 +14,14 @@ INSERT OVERWRITE TABLE dest_j1 SELECT sr
SELECT dest_j1.* FROM dest_j1;
-- verify that INNER is a non-reserved word for backwards compatibility
-create table inner(i int);
+-- change from HIVE-6617, inner is a SQL2011 reserved keyword.
+create table `inner`(i int);
-select i from inner;
+select i from `inner`;
-create table i(inner int);
+create table i(`inner` int);
-select inner from i;
+select `inner` from i;
-explain select * from (select * from src) inner left outer join src
-on inner.key=src.key;
+explain select * from (select * from src) `inner` left outer join src
+on `inner`.key=src.key;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/keyword_1.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/keyword_1.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/keyword_1.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/keyword_1.q Wed Mar 11 21:50:22 2015
@@ -1,9 +1,9 @@
-- SORT_BEFORE_DIFF
-create table test_user (user string, `group` string);
+create table test_user (`user` string, `group` string);
grant select on table test_user to user hive_test;
-explain select user from test_user;
+explain select `user` from test_user;
show grant user hive_test on table test_user;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/nonreserved_keywords_input37.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/nonreserved_keywords_input37.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/nonreserved_keywords_input37.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/nonreserved_keywords_input37.q Wed Mar 11 21:50:22 2015
@@ -1,12 +1,12 @@
-CREATE TABLE table(string string) STORED AS TEXTFILE;
+CREATE TABLE `table`(`string` string) STORED AS TEXTFILE;
-LOAD DATA LOCAL INPATH '../../data/files/docurl.txt' INTO TABLE table;
+LOAD DATA LOCAL INPATH '../../data/files/docurl.txt' INTO TABLE `table`;
-SELECT table, count(1)
+SELECT `table`, count(1)
FROM
(
- FROM table
- SELECT TRANSFORM (table.string)
- USING 'java -cp ../util/target/classes/ org.apache.hadoop.hive.scripts.extracturl' AS (table, count)
+ FROM `table`
+ SELECT TRANSFORM (`table`.`string`)
+ USING 'java -cp ../util/target/classes/ org.apache.hadoop.hive.scripts.extracturl' AS (`table`, count)
) subq
-GROUP BY table;
+GROUP BY `table`;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/nonreserved_keywords_insert_into1.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/nonreserved_keywords_insert_into1.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/nonreserved_keywords_insert_into1.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/nonreserved_keywords_insert_into1.q Wed Mar 11 21:50:22 2015
@@ -1,26 +1,26 @@
-DROP TABLE insert;
+DROP TABLE `insert`;
-CREATE TABLE insert (key INT, as STRING);
+CREATE TABLE `insert` (key INT, `as` STRING);
-EXPLAIN INSERT INTO TABLE insert SELECT * FROM src LIMIT 100;
-INSERT INTO TABLE insert SELECT * FROM src LIMIT 100;
+EXPLAIN INSERT INTO TABLE `insert` SELECT * FROM src LIMIT 100;
+INSERT INTO TABLE `insert` SELECT * FROM src LIMIT 100;
SELECT SUM(HASH(hash)) FROM (
- SELECT TRANSFORM(*) USING 'tr \t _' AS (hash) FROM insert
+ SELECT TRANSFORM(*) USING 'tr \t _' AS (hash) FROM `insert`
) t;
-EXPLAIN INSERT INTO TABLE insert SELECT * FROM src LIMIT 100;
-INSERT INTO TABLE insert SELECT * FROM src LIMIT 100;
+EXPLAIN INSERT INTO TABLE `insert` SELECT * FROM src LIMIT 100;
+INSERT INTO TABLE `insert` SELECT * FROM src LIMIT 100;
SELECT SUM(HASH(sum)) FROM (
- SELECT TRANSFORM(*) USING 'tr \t _' AS (sum) FROM insert
+ SELECT TRANSFORM(*) USING 'tr \t _' AS (sum) FROM `insert`
) t;
-SELECT COUNT(*) FROM insert;
+SELECT COUNT(*) FROM `insert`;
-EXPLAIN INSERT OVERWRITE TABLE insert SELECT * FROM src LIMIT 10;
-INSERT OVERWRITE TABLE insert SELECT * FROM src LIMIT 10;
+EXPLAIN INSERT OVERWRITE TABLE `insert` SELECT * FROM src LIMIT 10;
+INSERT OVERWRITE TABLE `insert` SELECT * FROM src LIMIT 10;
SELECT SUM(HASH(add)) FROM (
- SELECT TRANSFORM(*) USING 'tr \t _' AS (add) FROM insert
+ SELECT TRANSFORM(*) USING 'tr \t _' AS (add) FROM `insert`
) t;
-DROP TABLE insert;
+DROP TABLE `insert`;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/partition_wise_fileformat17.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/partition_wise_fileformat17.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/partition_wise_fileformat17.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/partition_wise_fileformat17.q Wed Mar 11 21:50:22 2015
@@ -4,7 +4,7 @@
DROP TABLE PW17;
ADD JAR ${system:maven.local.repository}/org/apache/hive/hive-it-custom-serde/${system:hive.version}/hive-it-custom-serde-${system:hive.version}.jar;
-CREATE TABLE PW17(USER STRING, COMPLEXDT ARRAY<INT>) PARTITIONED BY (YEAR STRING) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.CustomSerDe1';
+CREATE TABLE PW17(`USER` STRING, COMPLEXDT ARRAY<INT>) PARTITIONED BY (YEAR STRING) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.CustomSerDe1';
LOAD DATA LOCAL INPATH '../../data/files/pw17.txt' INTO TABLE PW17 PARTITION (YEAR='1');
ALTER TABLE PW17 PARTITION(YEAR='1') SET SERDE 'org.apache.hadoop.hive.serde2.CustomSerDe2';
ALTER TABLE PW17 SET SERDE 'org.apache.hadoop.hive.serde2.CustomSerDe1';
@@ -13,13 +13,13 @@ SELECT * FROM PW17;
-- Test for non-parititioned table.
DROP TABLE PW17_2;
-CREATE TABLE PW17_2(USER STRING, COMPLEXDT ARRAY<INT>) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.CustomSerDe1';
+CREATE TABLE PW17_2(`USER` STRING, COMPLEXDT ARRAY<INT>) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.CustomSerDe1';
LOAD DATA LOCAL INPATH '../../data/files/pw17.txt' INTO TABLE PW17_2;
-- Without the fix HIVE-5199, will throw cast exception via MapOperator
SELECT COUNT(*) FROM PW17_2;
DROP TABLE PW17_3;
-CREATE TABLE PW17_3(USER STRING, COMPLEXDT ARRAY<ARRAY<INT> >) PARTITIONED BY (YEAR STRING) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.CustomSerDe3';
+CREATE TABLE PW17_3(`USER` STRING, COMPLEXDT ARRAY<ARRAY<INT> >) PARTITIONED BY (YEAR STRING) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.CustomSerDe3';
LOAD DATA LOCAL INPATH '../../data/files/pw17.txt' INTO TABLE PW17_3 PARTITION (YEAR='1');
ALTER TABLE PW17_3 PARTITION(YEAR='1') SET SERDE 'org.apache.hadoop.hive.serde2.CustomSerDe2';
ALTER TABLE PW17_3 SET SERDE 'org.apache.hadoop.hive.serde2.CustomSerDe3';
@@ -27,7 +27,7 @@ ALTER TABLE PW17_3 SET SERDE 'org.apache
SELECT * FROM PW17;
DROP TABLE PW17_4;
-CREATE TABLE PW17_4(USER STRING, COMPLEXDT ARRAY<ARRAY<INT> >) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.CustomSerDe3';
+CREATE TABLE PW17_4(`USER` STRING, COMPLEXDT ARRAY<ARRAY<INT> >) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.CustomSerDe3';
LOAD DATA LOCAL INPATH '../../data/files/pw17.txt' INTO TABLE PW17_4;
-- Without the fix HIVE-5285, will throw cast exception via MapOperator
SELECT COUNT(*) FROM PW17_4;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/partition_wise_fileformat18.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/partition_wise_fileformat18.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/partition_wise_fileformat18.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/partition_wise_fileformat18.q Wed Mar 11 21:50:22 2015
@@ -5,7 +5,7 @@
DROP TABLE PW18;
ADD JAR ${system:maven.local.repository}/org/apache/hive/hive-it-custom-serde/${system:hive.version}/hive-it-custom-serde-${system:hive.version}.jar;
-CREATE TABLE PW18(USER STRING, COMPLEXDT UNIONTYPE<INT, DOUBLE>) PARTITIONED BY (YEAR STRING) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.CustomSerDe5';
+CREATE TABLE PW18(`USER` STRING, COMPLEXDT UNIONTYPE<INT, DOUBLE>) PARTITIONED BY (YEAR STRING) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.CustomSerDe5';
LOAD DATA LOCAL INPATH '../../data/files/pw17.txt' INTO TABLE PW18 PARTITION (YEAR='1');
ALTER TABLE PW18 PARTITION(YEAR='1') SET SERDE 'org.apache.hadoop.hive.serde2.CustomSerDe4';
-- Without the fix HIVE-5202, will throw unsupported data type exception.
@@ -13,7 +13,7 @@ SELECT * FROM PW18;
-- Test for non-parititioned table.
DROP TABLE PW18_2;
-CREATE TABLE PW18_2(USER STRING, COMPLEXDT UNIONTYPE<INT, DOUBLE>) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.CustomSerDe5';
+CREATE TABLE PW18_2(`USER` STRING, COMPLEXDT UNIONTYPE<INT, DOUBLE>) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.CustomSerDe5';
LOAD DATA LOCAL INPATH '../../data/files/pw17.txt' INTO TABLE PW18_2;
-- Without the fix HIVE-5202, will throw unsupported data type exception
SELECT COUNT(*) FROM PW18_2;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/ppd_field_garbage.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/ppd_field_garbage.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/ppd_field_garbage.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/ppd_field_garbage.q Wed Mar 11 21:50:22 2015
@@ -1,3 +1,5 @@
+set hive.support.sql11.reserved.keywords=false;
+-- We need the above setting for backward compatibility because 'user' is a keyword in SQL2011
-- ppd leaves invalid expr in field expr
CREATE TABLE test_issue (fileid int, infos ARRAY<STRUCT<user:INT>>, test_c STRUCT<user_c:STRUCT<age:INT>>);
CREATE VIEW v_test_issue AS SELECT fileid, i.user, test_c.user_c.age FROM test_issue LATERAL VIEW explode(infos) info AS i;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/serde_regex.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/serde_regex.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/serde_regex.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/serde_regex.q Wed Mar 11 21:50:22 2015
@@ -2,7 +2,7 @@ EXPLAIN
CREATE TABLE serde_regex(
host STRING,
identity STRING,
- user STRING,
+ `user` STRING,
time STRING,
request STRING,
status STRING,
@@ -18,7 +18,7 @@ STORED AS TEXTFILE;
CREATE TABLE serde_regex(
host STRING,
identity STRING,
- user STRING,
+ `user` STRING,
time STRING,
request STRING,
status STRING,
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/tez_union_group_by.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/tez_union_group_by.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/tez_union_group_by.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/tez_union_group_by.q Wed Mar 11 21:50:22 2015
@@ -4,7 +4,7 @@ u bigint,
t string,
st string
)
-PARTITIONED BY (date string)
+PARTITIONED BY (`date` string)
STORED AS ORC
TBLPROPERTIES ("orc.compress"="ZLIB");
@@ -12,7 +12,7 @@ CREATE TABLE y
(
u bigint
)
-PARTITIONED BY (date string)
+PARTITIONED BY (`date` string)
STORED AS ORC
TBLPROPERTIES ("orc.compress"="ZLIB");
@@ -20,7 +20,7 @@ CREATE TABLE z
(
u bigint
)
-PARTITIONED BY (date string)
+PARTITIONED BY (`date` string)
STORED AS ORC
TBLPROPERTIES ("orc.compress"="ZLIB");
@@ -37,14 +37,14 @@ EXPLAIN
SELECT o.u, n.u
FROM
(
-SELECT m.u, Min(date) as ft
+SELECT m.u, Min(`date`) as ft
FROM
(
-SELECT u, date FROM x WHERE date < '2014-09-02'
+SELECT u, `date` FROM x WHERE `date` < '2014-09-02'
UNION ALL
-SELECT u, date FROM y WHERE date < '2014-09-02'
+SELECT u, `date` FROM y WHERE `date` < '2014-09-02'
UNION ALL
-SELECT u, date FROM z WHERE date < '2014-09-02'
+SELECT u, `date` FROM z WHERE `date` < '2014-09-02'
) m
GROUP BY m.u
) n
@@ -54,7 +54,7 @@ SELECT x.u
FROM x
JOIN v
ON (x.t = v.t AND x.st <=> v.st)
-WHERE x.date >= '2014-03-04' AND x.date < '2014-09-03'
+WHERE x.`date` >= '2014-03-04' AND x.`date` < '2014-09-03'
GROUP BY x.u
) o
ON n.u = o.u
@@ -63,14 +63,14 @@ WHERE n.u <> 0 AND n.ft <= '2014-09-02';
SELECT o.u, n.u
FROM
(
-SELECT m.u, Min(date) as ft
+SELECT m.u, Min(`date`) as ft
FROM
(
-SELECT u, date FROM x WHERE date < '2014-09-02'
+SELECT u, `date` FROM x WHERE `date` < '2014-09-02'
UNION ALL
-SELECT u, date FROM y WHERE date < '2014-09-02'
+SELECT u, `date` FROM y WHERE `date` < '2014-09-02'
UNION ALL
-SELECT u, date FROM z WHERE date < '2014-09-02'
+SELECT u, `date` FROM z WHERE `date` < '2014-09-02'
) m
GROUP BY m.u
) n
@@ -80,7 +80,7 @@ SELECT x.u
FROM x
JOIN v
ON (x.t = v.t AND x.st <=> v.st)
-WHERE x.date >= '2014-03-04' AND x.date < '2014-09-03'
+WHERE x.`date` >= '2014-03-04' AND x.`date` < '2014-09-03'
GROUP BY x.u
) o
ON n.u = o.u
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_1.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_1.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_1.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_1.q Wed Mar 11 21:50:22 2015
@@ -18,7 +18,7 @@ set mapred.input.dir.recursive=true;
-- to run the test only on hadoop 23
create table inputTbl1(key string, val string) stored as textfile;
-create table outputTbl1(key string, values bigint) stored as textfile;
+create table outputTbl1(key string, `values` bigint) stored as textfile;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
@@ -26,20 +26,20 @@ explain
insert overwrite table outputTbl1
SELECT *
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) a;
insert overwrite table outputTbl1
SELECT *
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) a;
desc formatted outputTbl1;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 order by key, values;
+select * from outputTbl1 order by key, `values`;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_10.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_10.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_10.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_10.q Wed Mar 11 21:50:22 2015
@@ -23,7 +23,7 @@ set mapred.input.dir.recursive=true;
-- to run the test only on hadoop 23
create table inputTbl1(key string, val string) stored as textfile;
-create table outputTbl1(key string, values bigint) stored as rcfile;
+create table outputTbl1(key string, `values` bigint) stored as rcfile;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
@@ -31,28 +31,28 @@ explain
insert overwrite table outputTbl1
SELECT * FROM
(
-select key, 1 as values from inputTbl1
+select key, 1 as `values` from inputTbl1
union all
select * FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, 2 as values from inputTbl1
+ SELECT key, 2 as `values` from inputTbl1
) a
)b;
insert overwrite table outputTbl1
SELECT * FROM
(
-select key, 1 as values from inputTbl1
+select key, 1 as `values` from inputTbl1
union all
select * FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, 2 as values from inputTbl1
+ SELECT key, 2 as `values` from inputTbl1
) a
)b;
desc formatted outputTbl1;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 order by key, values;
+select * from outputTbl1 order by key, `values`;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_11.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_11.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_11.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_11.q Wed Mar 11 21:50:22 2015
@@ -23,7 +23,7 @@ set mapred.input.dir.recursive=true;
-- to run the test only on hadoop 23
create table inputTbl1(key string, val string) stored as textfile;
-create table outputTbl1(key string, values bigint) stored as rcfile;
+create table outputTbl1(key string, `values` bigint) stored as rcfile;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
@@ -31,28 +31,28 @@ explain
insert overwrite table outputTbl1
SELECT * FROM
(
-select key, 1 as values from inputTbl1
+select key, 1 as `values` from inputTbl1
union all
select * FROM (
- SELECT key, 2 values from inputTbl1
+ SELECT key, 2 `values` from inputTbl1
UNION ALL
- SELECT key, 3 as values from inputTbl1
+ SELECT key, 3 as `values` from inputTbl1
) a
)b;
insert overwrite table outputTbl1
SELECT * FROM
(
-select key, 1 as values from inputTbl1
+select key, 1 as `values` from inputTbl1
union all
select * FROM (
- SELECT key, 2 as values from inputTbl1
+ SELECT key, 2 as `values` from inputTbl1
UNION ALL
- SELECT key, 3 as values from inputTbl1
+ SELECT key, 3 as `values` from inputTbl1
) a
)b;
desc formatted outputTbl1;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 order by key, values;
+select * from outputTbl1 order by key, `values`;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_12.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_12.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_12.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_12.q Wed Mar 11 21:50:22 2015
@@ -23,7 +23,7 @@ set mapred.input.dir.recursive=true;
-- on
create table inputTbl1(key string, val string) stored as textfile;
-create table outputTbl1(key string, values bigint) stored as rcfile;
+create table outputTbl1(key string, `values` bigint) stored as rcfile;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
@@ -31,22 +31,22 @@ explain
insert overwrite table outputTbl1
SELECT * FROM
(
-select key, 1 as values from inputTbl1
+select key, 1 as `values` from inputTbl1
union all
-select a.key as key, b.val as values
+select a.key as key, b.val as `values`
FROM inputTbl1 a join inputTbl1 b on a.key=b.key
)c;
insert overwrite table outputTbl1
SELECT * FROM
(
-select key, 1 as values from inputTbl1
+select key, 1 as `values` from inputTbl1
union all
-select a.key as key, b.val as values
+select a.key as key, b.val as `values`
FROM inputTbl1 a join inputTbl1 b on a.key=b.key
)c;
desc formatted outputTbl1;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 order by key, values;
+select * from outputTbl1 order by key, `values`;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_13.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_13.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_13.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_13.q Wed Mar 11 21:50:22 2015
@@ -23,7 +23,7 @@ set mapred.input.dir.recursive=true;
-- on
create table inputTbl1(key string, val string) stored as textfile;
-create table outputTbl1(key string, values bigint) stored as rcfile;
+create table outputTbl1(key string, `values` bigint) stored as rcfile;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
@@ -31,22 +31,22 @@ explain
insert overwrite table outputTbl1
SELECT * FROM
(
-select key, count(1) as values from inputTbl1 group by key
+select key, count(1) as `values` from inputTbl1 group by key
union all
-select a.key as key, b.val as values
+select a.key as key, b.val as `values`
FROM inputTbl1 a join inputTbl1 b on a.key=b.key
)c;
insert overwrite table outputTbl1
SELECT * FROM
(
-select key, count(1) as values from inputTbl1 group by key
+select key, count(1) as `values` from inputTbl1 group by key
union all
-select a.key as key, b.val as values
+select a.key as key, b.val as `values`
FROM inputTbl1 a join inputTbl1 b on a.key=b.key
)c;
desc formatted outputTbl1;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 order by key, values;
+select * from outputTbl1 order by key, `values`;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_14.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_14.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_14.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_14.q Wed Mar 11 21:50:22 2015
@@ -24,7 +24,7 @@ set mapred.input.dir.recursive=true;
-- on
create table inputTbl1(key string, val string) stored as textfile;
-create table outputTbl1(key string, values bigint) stored as rcfile;
+create table outputTbl1(key string, `values` bigint) stored as rcfile;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
@@ -32,22 +32,22 @@ explain
insert overwrite table outputTbl1
SELECT * FROM
(
-select key, 1 as values from inputTbl1
+select key, 1 as `values` from inputTbl1
union all
-select a.key as key, b.val as values
+select a.key as key, b.val as `values`
FROM inputTbl1 a join inputTbl1 b on a.key=b.key
)c;
insert overwrite table outputTbl1
SELECT * FROM
(
-select key, 1 as values from inputTbl1
+select key, 1 as `values` from inputTbl1
union all
-select a.key as key, b.val as values
+select a.key as key, b.val as `values`
FROM inputTbl1 a join inputTbl1 b on a.key=b.key
)c;
desc formatted outputTbl1;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 order by key, values;
+select * from outputTbl1 order by key, `values`;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_15.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_15.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_15.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_15.q Wed Mar 11 21:50:22 2015
@@ -24,7 +24,7 @@ set mapred.input.dir.recursive=true;
-- to run the test only on hadoop 23
create table inputTbl1(key string, val string) stored as textfile;
-create table outputTbl1(key string, values bigint) partitioned by (ds string) stored as rcfile;
+create table outputTbl1(key string, `values` bigint) partitioned by (ds string) stored as rcfile;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
@@ -32,17 +32,17 @@ explain
insert overwrite table outputTbl1 partition (ds)
SELECT *
FROM (
- SELECT key, count(1) as values, '1' as ds from inputTbl1 group by key
+ SELECT key, count(1) as `values`, '1' as ds from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values, '2' as ds from inputTbl1 group by key
+ SELECT key, count(1) as `values`, '2' as ds from inputTbl1 group by key
) a;
insert overwrite table outputTbl1 partition (ds)
SELECT *
FROM (
- SELECT key, count(1) as values, '1' as ds from inputTbl1 group by key
+ SELECT key, count(1) as `values`, '1' as ds from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values, '2' as ds from inputTbl1 group by key
+ SELECT key, count(1) as `values`, '2' as ds from inputTbl1 group by key
) a;
desc formatted outputTbl1;
@@ -50,5 +50,5 @@ desc formatted outputTbl1;
show partitions outputTbl1;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 where ds = '1' order by key, values;
-select * from outputTbl1 where ds = '2' order by key, values;
+select * from outputTbl1 where ds = '1' order by key, `values`;
+select * from outputTbl1 where ds = '2' order by key, `values`;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_16.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_16.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_16.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_16.q Wed Mar 11 21:50:22 2015
@@ -24,7 +24,7 @@ set hive.exec.dynamic.partition=true;
-- to run the test only on hadoop 23
create table inputTbl1(key string, val string) stored as textfile;
-create table outputTbl1(key string, values bigint) partitioned by (ds string) stored as rcfile ;
+create table outputTbl1(key string, `values` bigint) partitioned by (ds string) stored as rcfile ;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
@@ -32,22 +32,22 @@ explain
insert overwrite table outputTbl1 partition (ds)
SELECT *
FROM (
- SELECT key, count(1) as values, '1' as ds from inputTbl1 group by key
+ SELECT key, count(1) as `values`, '1' as ds from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values, '2' as ds from inputTbl1 group by key
+ SELECT key, count(1) as `values`, '2' as ds from inputTbl1 group by key
) a;
insert overwrite table outputTbl1 partition (ds)
SELECT *
FROM (
- SELECT key, count(1) as values, '1' as ds from inputTbl1 group by key
+ SELECT key, count(1) as `values`, '1' as ds from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values, '2' as ds from inputTbl1 group by key
+ SELECT key, count(1) as `values`, '2' as ds from inputTbl1 group by key
) a;
desc formatted outputTbl1;
show partitions outputTbl1;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 where ds = '1' order by key, values;
-select * from outputTbl1 where ds = '2' order by key, values;
+select * from outputTbl1 where ds = '1' order by key, `values`;
+select * from outputTbl1 where ds = '2' order by key, `values`;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_17.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_17.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_17.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_17.q Wed Mar 11 21:50:22 2015
@@ -21,7 +21,7 @@ set mapred.input.dir.recursive=true;
-- to run the test only on hadoop 23
create table inputTbl1(key string, val string) stored as textfile;
-create table outputTbl1(key string, values bigint) partitioned by (ds string) stored as rcfile;
+create table outputTbl1(key string, `values` bigint) partitioned by (ds string) stored as rcfile;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
@@ -29,22 +29,22 @@ explain
insert overwrite table outputTbl1 partition (ds)
SELECT *
FROM (
- SELECT key, 1 as values, '1' as ds from inputTbl1
+ SELECT key, 1 as `values`, '1' as ds from inputTbl1
UNION ALL
- SELECT key, 2 as values, '2' as ds from inputTbl1
+ SELECT key, 2 as `values`, '2' as ds from inputTbl1
) a;
insert overwrite table outputTbl1 partition (ds)
SELECT *
FROM (
- SELECT key, 1 as values, '1' as ds from inputTbl1
+ SELECT key, 1 as `values`, '1' as ds from inputTbl1
UNION ALL
- SELECT key, 2 as values, '2' as ds from inputTbl1
+ SELECT key, 2 as `values`, '2' as ds from inputTbl1
) a;
desc formatted outputTbl1;
show partitions outputTbl1;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 where ds = '1' order by key, values;
-select * from outputTbl1 where ds = '2' order by key, values;
+select * from outputTbl1 where ds = '1' order by key, `values`;
+select * from outputTbl1 where ds = '2' order by key, `values`;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_18.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_18.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_18.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_18.q Wed Mar 11 21:50:22 2015
@@ -23,7 +23,7 @@ set mapred.input.dir.recursive=true;
-- to run the test only on hadoop 23
create table inputTbl1(key string, ds string) stored as textfile;
-create table outputTbl1(key string, values bigint) partitioned by (ds string) stored as textfile;
+create table outputTbl1(key string, `values` bigint) partitioned by (ds string) stored as textfile;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
@@ -31,17 +31,17 @@ explain
insert overwrite table outputTbl1 partition (ds)
SELECT *
FROM (
- SELECT key, count(1) as values, ds from inputTbl1 group by key, ds
+ SELECT key, count(1) as `values`, ds from inputTbl1 group by key, ds
UNION ALL
- SELECT key, count(1) as values, ds from inputTbl1 group by key, ds
+ SELECT key, count(1) as `values`, ds from inputTbl1 group by key, ds
) a;
insert overwrite table outputTbl1 partition (ds)
SELECT *
FROM (
- SELECT key, count(1) as values, ds from inputTbl1 group by key, ds
+ SELECT key, count(1) as `values`, ds from inputTbl1 group by key, ds
UNION ALL
- SELECT key, count(1) as values, ds from inputTbl1 group by key, ds
+ SELECT key, count(1) as `values`, ds from inputTbl1 group by key, ds
) a;
desc formatted outputTbl1;
@@ -49,6 +49,6 @@ desc formatted outputTbl1;
show partitions outputTbl1;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 where ds = '11' order by key, values;
-select * from outputTbl1 where ds = '18' order by key, values;
-select * from outputTbl1 where ds is not null order by key, values, ds;
+select * from outputTbl1 where ds = '11' order by key, `values`;
+select * from outputTbl1 where ds = '18' order by key, `values`;
+select * from outputTbl1 where ds is not null order by key, `values`, ds;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_19.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_19.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_19.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_19.q Wed Mar 11 21:50:22 2015
@@ -20,25 +20,25 @@ set mapred.input.dir.recursive=true;
-- SORT_QUERY_RESULTS
create table inputTbl1(key string, val string) stored as textfile;
-create table outputTbl1(key string, values bigint) stored as textfile;
+create table outputTbl1(key string, `values` bigint) stored as textfile;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
explain
insert overwrite table outputTbl1
-SELECT a.key, a.values
+SELECT a.key, a.`values`
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) a;
insert overwrite table outputTbl1
-SELECT a.key, a.values
+SELECT a.key, a.`values`
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) a;
desc formatted outputTbl1;
@@ -48,19 +48,19 @@ select * from outputTbl1;
-- filter should be fine
explain
insert overwrite table outputTbl1
-SELECT a.key, a.values
+SELECT a.key, a.`values`
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) a where a.key = 7;
insert overwrite table outputTbl1
-SELECT a.key, a.values
+SELECT a.key, a.`values`
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) a where a.key = 7;
select * from outputTbl1;
@@ -68,26 +68,26 @@ select * from outputTbl1;
-- filters and sub-queries should be fine
explain
insert overwrite table outputTbl1
-select key, values from
+select key, `values` from
(
-SELECT a.key + a.key as key, a.values
+SELECT a.key + a.key as key, a.`values`
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) a
) b where b.key >= 7;
insert overwrite table outputTbl1
-select key, values from
+select key, `values` from
(
-SELECT a.key + a.key as key, a.values
+SELECT a.key + a.key as key, a.`values`
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) a
) b where b.key >= 7;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 order by key, values;
+select * from outputTbl1 order by key, `values`;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_2.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_2.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_2.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_2.q Wed Mar 11 21:50:22 2015
@@ -19,7 +19,7 @@ set mapred.input.dir.recursive=true;
-- to run the test only on hadoop 23
create table inputTbl1(key string, val string) stored as textfile;
-create table outputTbl1(key string, values bigint) stored as textfile;
+create table outputTbl1(key string, `values` bigint) stored as textfile;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
@@ -27,25 +27,25 @@ explain
insert overwrite table outputTbl1
SELECT *
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, 1 as values from inputTbl1
+ SELECT key, 1 as `values` from inputTbl1
UNION ALL
- SELECT key, 2 as values from inputTbl1
+ SELECT key, 2 as `values` from inputTbl1
) a;
insert overwrite table outputTbl1
SELECT *
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, 1 as values from inputTbl1
+ SELECT key, 1 as `values` from inputTbl1
UNION ALL
- SELECT key, 2 as values from inputTbl1
+ SELECT key, 2 as `values` from inputTbl1
) a;
desc formatted outputTbl1;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 order by key, values;
+select * from outputTbl1 order by key, `values`;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_20.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_20.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_20.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_20.q Wed Mar 11 21:50:22 2015
@@ -19,28 +19,28 @@ set mapred.input.dir.recursive=true;
-- columns being selected) is pushed above the union.
create table inputTbl1(key string, val string) stored as textfile;
-create table outputTbl1(values bigint, key string) stored as textfile;
+create table outputTbl1(`values` bigint, key string) stored as textfile;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
explain
insert overwrite table outputTbl1
-SELECT a.values, a.key
+SELECT a.`values`, a.key
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) a;
insert overwrite table outputTbl1
-SELECT a.values, a.key
+SELECT a.`values`, a.key
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) a;
desc formatted outputTbl1;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 order by key, values;
+select * from outputTbl1 order by key, `values`;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_21.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_21.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_21.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_21.q Wed Mar 11 21:50:22 2015
@@ -27,17 +27,17 @@ explain
insert overwrite table outputTbl1
SELECT a.key
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) a;
insert overwrite table outputTbl1
SELECT a.key
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) a;
desc formatted outputTbl1;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_22.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_22.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_22.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_22.q Wed Mar 11 21:50:22 2015
@@ -18,25 +18,25 @@ set mapred.input.dir.recursive=true;
-- both the sub-qeuries of the union) is pushed above the union.
create table inputTbl1(key string, val string) stored as textfile;
-create table outputTbl1(key string, values bigint, values2 bigint) stored as textfile;
+create table outputTbl1(key string, `values` bigint, values2 bigint) stored as textfile;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
explain
insert overwrite table outputTbl1
-SELECT a.key, a.values, a.values
+SELECT a.key, a.`values`, a.`values`
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) a;
insert overwrite table outputTbl1
-SELECT a.key, a.values, a.values
+SELECT a.key, a.`values`, a.`values`
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) a;
desc formatted outputTbl1;
@@ -45,20 +45,20 @@ select * from outputTbl1;
explain
insert overwrite table outputTbl1
-SELECT a.key, concat(a.values, a.values), concat(a.values, a.values)
+SELECT a.key, concat(a.`values`, a.`values`), concat(a.`values`, a.`values`)
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) a;
insert overwrite table outputTbl1
-SELECT a.key, concat(a.values, a.values), concat(a.values, a.values)
+SELECT a.key, concat(a.`values`, a.`values`), concat(a.`values`, a.`values`)
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) a;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 order by key, values;
+select * from outputTbl1 order by key, `values`;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_23.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_23.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_23.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_23.q Wed Mar 11 21:50:22 2015
@@ -19,7 +19,7 @@ set mapred.input.dir.recursive=true;
-- to run the test only on hadoop 23
create table inputTbl1(key string, val string) stored as textfile;
-create table outputTbl1(key string, values bigint) stored as textfile;
+create table outputTbl1(key string, `values` bigint) stored as textfile;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
@@ -27,22 +27,22 @@ explain
insert overwrite table outputTbl1
SELECT *
FROM (
- SELECT key, count(1) as values from
+ SELECT key, count(1) as `values` from
(SELECT a.key, b.val from inputTbl1 a join inputTbl1 b on a.key=b.key) subq group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) subq2;
insert overwrite table outputTbl1
SELECT *
FROM (
- SELECT key, count(1) as values from
+ SELECT key, count(1) as `values` from
(SELECT a.key, b.val from inputTbl1 a join inputTbl1 b on a.key=b.key) subq group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) subq2;
desc formatted outputTbl1;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 order by key, values;
+select * from outputTbl1 order by key, `values`;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_24.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_24.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_24.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_24.q Wed Mar 11 21:50:22 2015
@@ -17,7 +17,7 @@ set mapred.input.dir.recursive=true;
-- to run the test only on hadoop 23
create table inputTbl1(key string, val string) stored as textfile;
-create table outputTbl1(key double, values bigint) stored as textfile;
+create table outputTbl1(key double, `values` bigint) stored as textfile;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
@@ -25,20 +25,20 @@ EXPLAIN
INSERT OVERWRITE TABLE outputTbl1
SELECT * FROM
(
- SELECT CAST(key AS DOUBLE) AS key, count(1) as values FROM inputTbl1 group by key
+ SELECT CAST(key AS DOUBLE) AS key, count(1) as `values` FROM inputTbl1 group by key
UNION ALL
- SELECT CAST(key AS BIGINT) AS key, count(1) as values FROM inputTbl1 group by key
+ SELECT CAST(key AS BIGINT) AS key, count(1) as `values` FROM inputTbl1 group by key
) a;
INSERT OVERWRITE TABLE outputTbl1
SELECT * FROM
(
- SELECT CAST(key AS DOUBLE) AS key, count(1) as values FROM inputTbl1 group by key
+ SELECT CAST(key AS DOUBLE) AS key, count(1) as `values` FROM inputTbl1 group by key
UNION ALL
- SELECT CAST(key AS BIGINT) AS key, count(1) as values FROM inputTbl1 group by key
+ SELECT CAST(key AS BIGINT) AS key, count(1) as `values` FROM inputTbl1 group by key
) a;
desc formatted outputTbl1;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 order by key, values;
+select * from outputTbl1 order by key, `values`;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_25.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_25.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_25.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_25.q Wed Mar 11 21:50:22 2015
@@ -19,9 +19,9 @@ set mapred.input.dir.recursive=true;
-- to run the test only on hadoop 23
create table inputTbl1(key string, val string) stored as textfile;
-create table outputTbl1(key string, values bigint) partitioned by (ds string) stored as textfile;
-create table outputTbl2(key string, values bigint) partitioned by (ds string) stored as textfile;
-create table outputTbl3(key string, values bigint) partitioned by (ds string,hr string) stored as textfile;
+create table outputTbl1(key string, `values` bigint) partitioned by (ds string) stored as textfile;
+create table outputTbl2(key string, `values` bigint) partitioned by (ds string) stored as textfile;
+create table outputTbl3(key string, `values` bigint) partitioned by (ds string,hr string) stored as textfile;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
@@ -29,23 +29,23 @@ explain
insert overwrite table outputTbl1 partition(ds='2004')
SELECT *
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) a;
insert overwrite table outputTbl1 partition(ds='2004')
SELECT *
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) a;
desc formatted outputTbl1 partition(ds='2004');
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 order by key, values;
+select * from outputTbl1 order by key, `values`;
explain
insert overwrite table outputTbl2 partition(ds)
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_3.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_3.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_3.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_3.q Wed Mar 11 21:50:22 2015
@@ -19,7 +19,7 @@ set mapred.input.dir.recursive=true;
-- to run the test only on hadoop 23
create table inputTbl1(key string, val string) stored as textfile;
-create table outputTbl1(key string, values bigint) stored as textfile;
+create table outputTbl1(key string, `values` bigint) stored as textfile;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
@@ -27,25 +27,25 @@ explain
insert overwrite table outputTbl1
SELECT *
FROM (
- SELECT key, 1 as values from inputTbl1
+ SELECT key, 1 as `values` from inputTbl1
UNION ALL
- SELECT key, 2 as values from inputTbl1
+ SELECT key, 2 as `values` from inputTbl1
UNION ALL
- SELECT key, 3 as values from inputTbl1
+ SELECT key, 3 as `values` from inputTbl1
) a;
insert overwrite table outputTbl1
SELECT *
FROM (
- SELECT key, 1 as values from inputTbl1
+ SELECT key, 1 as `values` from inputTbl1
UNION ALL
- SELECT key, 2 as values from inputTbl1
+ SELECT key, 2 as `values` from inputTbl1
UNION ALL
- SELECT key, 3 as values from inputTbl1
+ SELECT key, 3 as `values` from inputTbl1
) a;
desc formatted outputTbl1;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 order by key, values;
+select * from outputTbl1 order by key, `values`;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_4.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_4.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_4.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_4.q Wed Mar 11 21:50:22 2015
@@ -19,7 +19,7 @@ set hive.merge.smallfiles.avgsize=1;
-- to run the test only on hadoop 23
create table inputTbl1(key string, val string) stored as textfile;
-create table outputTbl1(key string, values bigint) stored as textfile;
+create table outputTbl1(key string, `values` bigint) stored as textfile;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
@@ -27,20 +27,20 @@ explain
insert overwrite table outputTbl1
SELECT *
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) a;
insert overwrite table outputTbl1
SELECT *
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) a;
desc formatted outputTbl1;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 order by key, values;
+select * from outputTbl1 order by key, `values`;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_5.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_5.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_5.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_5.q Wed Mar 11 21:50:22 2015
@@ -21,7 +21,7 @@ set mapred.input.dir.recursive=true;
-- to run the test only on hadoop 23
create table inputTbl1(key string, val string) stored as textfile;
-create table outputTbl1(key string, values bigint) stored as textfile;
+create table outputTbl1(key string, `values` bigint) stored as textfile;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
@@ -29,24 +29,24 @@ explain
insert overwrite table outputTbl1
SELECT *
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, 1 as values from inputTbl1
+ SELECT key, 1 as `values` from inputTbl1
UNION ALL
- SELECT key, 2 as values from inputTbl1
+ SELECT key, 2 as `values` from inputTbl1
) a;
insert overwrite table outputTbl1
SELECT *
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, 1 as values from inputTbl1
+ SELECT key, 1 as `values` from inputTbl1
UNION ALL
- SELECT key, 2 as values from inputTbl1
+ SELECT key, 2 as `values` from inputTbl1
) a;
desc formatted outputTbl1;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 order by key, values;
+select * from outputTbl1 order by key, `values`;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_6.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_6.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_6.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_6.q Wed Mar 11 21:50:22 2015
@@ -15,28 +15,28 @@ set mapred.input.dir.recursive=true;
-- merging is turned off
create table inputTbl1(key string, val string) stored as textfile;
-create table outputTbl1(key string, values bigint) stored as textfile;
-create table outputTbl2(key string, values bigint) stored as textfile;
+create table outputTbl1(key string, `values` bigint) stored as textfile;
+create table outputTbl2(key string, `values` bigint) stored as textfile;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
explain
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) a
insert overwrite table outputTbl1 select *
insert overwrite table outputTbl2 select *;
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) a
insert overwrite table outputTbl1 select *
insert overwrite table outputTbl2 select *;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 order by key, values;
-select * from outputTbl2 order by key, values;;
+select * from outputTbl1 order by key, `values`;
+select * from outputTbl2 order by key, `values`;;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_6_subq.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_6_subq.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_6_subq.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_6_subq.q Wed Mar 11 21:50:22 2015
@@ -14,17 +14,17 @@ set mapred.input.dir.recursive=true;
-- merging is turned off
create table inputTbl1(key string, val string) stored as textfile;
-create table outputTbl1(key string, values bigint) stored as textfile;
-create table outputTbl2(key string, values bigint) stored as textfile;
+create table outputTbl1(key string, `values` bigint) stored as textfile;
+create table outputTbl2(key string, `values` bigint) stored as textfile;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
explain
FROM (
select * from(
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
)subq
) a
insert overwrite table outputTbl1 select *
@@ -32,17 +32,17 @@ insert overwrite table outputTbl2 select
FROM (
select * from(
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
)subq
) a
insert overwrite table outputTbl1 select *
insert overwrite table outputTbl2 select *;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 order by key, values;
-select * from outputTbl2 order by key, values;
+select * from outputTbl1 order by key, `values`;
+select * from outputTbl2 order by key, `values`;
-- The following queries guarantee the correctness.
explain
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_7.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_7.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_7.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_7.q Wed Mar 11 21:50:22 2015
@@ -20,7 +20,7 @@ set mapred.input.dir.recursive=true;
-- to run the test only on hadoop 23
create table inputTbl1(key string, val string) stored as textfile;
-create table outputTbl1(key string, values bigint) stored as rcfile;
+create table outputTbl1(key string, `values` bigint) stored as rcfile;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
@@ -28,20 +28,20 @@ explain
insert overwrite table outputTbl1
SELECT *
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) a;
insert overwrite table outputTbl1
SELECT *
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
) a;
desc formatted outputTbl1;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 order by key, values;
+select * from outputTbl1 order by key, `values`;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_8.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_8.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_8.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_8.q Wed Mar 11 21:50:22 2015
@@ -21,7 +21,7 @@ set mapred.input.dir.recursive=true;
-- to run the test only on hadoop 23
create table inputTbl1(key string, val string) stored as textfile;
-create table outputTbl1(key string, values bigint) stored as rcfile;
+create table outputTbl1(key string, `values` bigint) stored as rcfile;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
@@ -29,24 +29,24 @@ explain
insert overwrite table outputTbl1
SELECT *
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, 1 as values from inputTbl1
+ SELECT key, 1 as `values` from inputTbl1
UNION ALL
- SELECT key, 2 as values from inputTbl1
+ SELECT key, 2 as `values` from inputTbl1
) a;
insert overwrite table outputTbl1
SELECT *
FROM (
- SELECT key, count(1) as values from inputTbl1 group by key
+ SELECT key, count(1) as `values` from inputTbl1 group by key
UNION ALL
- SELECT key, 1 as values from inputTbl1
+ SELECT key, 1 as `values` from inputTbl1
UNION ALL
- SELECT key, 2 as values from inputTbl1
+ SELECT key, 2 as `values` from inputTbl1
) a;
desc formatted outputTbl1;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 order by key, values;
+select * from outputTbl1 order by key, `values`;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_9.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_9.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_9.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/union_remove_9.q Wed Mar 11 21:50:22 2015
@@ -21,7 +21,7 @@ set mapred.input.dir.recursive=true;
-- to run the test only on hadoop 23
create table inputTbl1(key string, val string) stored as textfile;
-create table outputTbl1(key string, values bigint) stored as rcfile;
+create table outputTbl1(key string, `values` bigint) stored as rcfile;
load data local inpath '../../data/files/T1.txt' into table inputTbl1;
@@ -29,28 +29,28 @@ explain
insert overwrite table outputTbl1
SELECT * FROM
(
-select key, count(1) as values from inputTbl1 group by key
+select key, count(1) as `values` from inputTbl1 group by key
union all
select * FROM (
- SELECT key, 1 as values from inputTbl1
+ SELECT key, 1 as `values` from inputTbl1
UNION ALL
- SELECT key, 2 as values from inputTbl1
+ SELECT key, 2 as `values` from inputTbl1
) a
)b;
insert overwrite table outputTbl1
SELECT * FROM
(
-select key, count(1) as values from inputTbl1 group by key
+select key, count(1) as `values` from inputTbl1 group by key
union all
select * FROM (
- SELECT key, 1 as values from inputTbl1
+ SELECT key, 1 as `values` from inputTbl1
UNION ALL
- SELECT key, 2 as values from inputTbl1
+ SELECT key, 2 as `values` from inputTbl1
) a
)b;
desc formatted outputTbl1;
set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
-select * from outputTbl1 order by key, values;
+select * from outputTbl1 order by key, `values`;
Modified: hive/branches/cbo/ql/src/test/queries/clientpositive/vector_decimal_10_0.q
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/test/queries/clientpositive/vector_decimal_10_0.q?rev=1666021&r1=1666020&r2=1666021&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/test/queries/clientpositive/vector_decimal_10_0.q (original)
+++ hive/branches/cbo/ql/src/test/queries/clientpositive/vector_decimal_10_0.q Wed Mar 11 21:50:22 2015
@@ -2,18 +2,18 @@ SET hive.vectorized.execution.enabled=tr
set hive.fetch.task.conversion=minimal;
DROP TABLE IF EXISTS decimal_txt;
-DROP TABLE IF EXISTS decimal;
+DROP TABLE IF EXISTS `decimal`;
CREATE TABLE decimal_txt (dec decimal);
LOAD DATA LOCAL INPATH '../../data/files/decimal_10_0.txt' OVERWRITE INTO TABLE decimal_txt;
-CREATE TABLE DECIMAL STORED AS ORC AS SELECT * FROM decimal_txt;
+CREATE TABLE `DECIMAL` STORED AS ORC AS SELECT * FROM decimal_txt;
EXPLAIN
-SELECT dec FROM DECIMAL order by dec;
+SELECT dec FROM `DECIMAL` order by dec;
-SELECT dec FROM DECIMAL order by dec;
+SELECT dec FROM `DECIMAL` order by dec;
DROP TABLE DECIMAL_txt;
-DROP TABLE DECIMAL;
\ No newline at end of file
+DROP TABLE `DECIMAL`;
\ No newline at end of file