hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject svn commit: r1227151 - in /hive/trunk/ql/src: java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java test/queries/clientpositive/alter_merge_2.q test/results/clientpositive/alter_merge_2.q.out
Date Wed, 04 Jan 2012 13:32:53 GMT
Author: namit
Date: Wed Jan  4 13:32:53 2012
New Revision: 1227151

URL: http://svn.apache.org/viewvc?rev=1227151&view=rev
Log:
HIVE-2690 a bug in 'alter table concatenate' that causes filenames getting
double url encoded (He Yongqiang via namit)


Added:
    hive/trunk/ql/src/test/queries/clientpositive/alter_merge_2.q
    hive/trunk/ql/src/test/results/clientpositive/alter_merge_2.q.out
Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java?rev=1227151&r1=1227150&r2=1227151&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java Wed Jan
 4 13:32:53 2012
@@ -1166,12 +1166,12 @@ public class DDLSemanticAnalyzer extends
           bucketCols = part.getBucketCols();
           inputFormatClass = part.getInputFormatClass();
           isArchived = ArchiveUtils.isArchived(part);
-          tblPartLoc = part.getDataLocation().toString();
+          tblPartLoc = part.getPartitionPath().toString();
         }
       } else {
         inputFormatClass = tblObj.getInputFormatClass();
         bucketCols = tblObj.getBucketCols();
-        tblPartLoc = tblObj.getDataLocation().toString();
+        tblPartLoc = tblObj.getPath().toString();
       }
 
       // throw a HiveException for non-rcfile.

Added: hive/trunk/ql/src/test/queries/clientpositive/alter_merge_2.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/alter_merge_2.q?rev=1227151&view=auto
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/alter_merge_2.q (added)
+++ hive/trunk/ql/src/test/queries/clientpositive/alter_merge_2.q Wed Jan  4 13:32:53 2012
@@ -0,0 +1,19 @@
+create table src_rc_merge_test_part(key int, value string) partitioned by (ds string, ts
string) stored as rcfile;
+
+alter table src_rc_merge_test_part add partition (ds='2012-01-03', ts='2012-01-03+14:46:31');
+desc extended src_rc_merge_test_part partition (ds='2012-01-03', ts='2012-01-03+14:46:31');
+
+load data local inpath '../data/files/smbbucket_1.rc' into table src_rc_merge_test_part partition
(ds='2012-01-03', ts='2012-01-03+14:46:31');
+load data local inpath '../data/files/smbbucket_2.rc' into table src_rc_merge_test_part partition
(ds='2012-01-03', ts='2012-01-03+14:46:31');
+load data local inpath '../data/files/smbbucket_3.rc' into table src_rc_merge_test_part partition
(ds='2012-01-03', ts='2012-01-03+14:46:31');
+
+select count(1) from src_rc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31';
+select sum(hash(key)), sum(hash(value)) from src_rc_merge_test_part where ds='2012-01-03'
and ts='2012-01-03+14:46:31';
+
+alter table src_rc_merge_test_part partition (ds='2012-01-03', ts='2012-01-03+14:46:31')
concatenate;
+
+
+select count(1) from src_rc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31';
+select sum(hash(key)), sum(hash(value)) from src_rc_merge_test_part where ds='2012-01-03'
and ts='2012-01-03+14:46:31';
+
+drop table src_rc_merge_test_part;

Added: hive/trunk/ql/src/test/results/clientpositive/alter_merge_2.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/alter_merge_2.q.out?rev=1227151&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/alter_merge_2.q.out (added)
+++ hive/trunk/ql/src/test/results/clientpositive/alter_merge_2.q.out Wed Jan  4 13:32:53
2012
@@ -0,0 +1,92 @@
+PREHOOK: query: create table src_rc_merge_test_part(key int, value string) partitioned by
(ds string, ts string) stored as rcfile
+PREHOOK: type: CREATETABLE
+POSTHOOK: query: create table src_rc_merge_test_part(key int, value string) partitioned by
(ds string, ts string) stored as rcfile
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: default@src_rc_merge_test_part
+PREHOOK: query: alter table src_rc_merge_test_part add partition (ds='2012-01-03', ts='2012-01-03+14:46:31')
+PREHOOK: type: ALTERTABLE_ADDPARTS
+PREHOOK: Input: default@src_rc_merge_test_part
+POSTHOOK: query: alter table src_rc_merge_test_part add partition (ds='2012-01-03', ts='2012-01-03+14:46:31')
+POSTHOOK: type: ALTERTABLE_ADDPARTS
+POSTHOOK: Input: default@src_rc_merge_test_part
+POSTHOOK: Output: default@src_rc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
+PREHOOK: query: desc extended src_rc_merge_test_part partition (ds='2012-01-03', ts='2012-01-03+14:46:31')
+PREHOOK: type: DESCTABLE
+POSTHOOK: query: desc extended src_rc_merge_test_part partition (ds='2012-01-03', ts='2012-01-03+14:46:31')
+POSTHOOK: type: DESCTABLE
+key	int	
+value	string	
+ds	string	
+ts	string	
+	 	 
+#### A masked pattern was here ####
+PREHOOK: query: load data local inpath '../data/files/smbbucket_1.rc' into table src_rc_merge_test_part
partition (ds='2012-01-03', ts='2012-01-03+14:46:31')
+PREHOOK: type: LOAD
+PREHOOK: Output: default@src_rc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
+POSTHOOK: query: load data local inpath '../data/files/smbbucket_1.rc' into table src_rc_merge_test_part
partition (ds='2012-01-03', ts='2012-01-03+14:46:31')
+POSTHOOK: type: LOAD
+POSTHOOK: Output: default@src_rc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
+PREHOOK: query: load data local inpath '../data/files/smbbucket_2.rc' into table src_rc_merge_test_part
partition (ds='2012-01-03', ts='2012-01-03+14:46:31')
+PREHOOK: type: LOAD
+PREHOOK: Output: default@src_rc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
+POSTHOOK: query: load data local inpath '../data/files/smbbucket_2.rc' into table src_rc_merge_test_part
partition (ds='2012-01-03', ts='2012-01-03+14:46:31')
+POSTHOOK: type: LOAD
+POSTHOOK: Output: default@src_rc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
+PREHOOK: query: load data local inpath '../data/files/smbbucket_3.rc' into table src_rc_merge_test_part
partition (ds='2012-01-03', ts='2012-01-03+14:46:31')
+PREHOOK: type: LOAD
+PREHOOK: Output: default@src_rc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
+POSTHOOK: query: load data local inpath '../data/files/smbbucket_3.rc' into table src_rc_merge_test_part
partition (ds='2012-01-03', ts='2012-01-03+14:46:31')
+POSTHOOK: type: LOAD
+POSTHOOK: Output: default@src_rc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
+PREHOOK: query: select count(1) from src_rc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src_rc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
+#### A masked pattern was here ####
+POSTHOOK: query: select count(1) from src_rc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src_rc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
+#### A masked pattern was here ####
+15
+PREHOOK: query: select sum(hash(key)), sum(hash(value)) from src_rc_merge_test_part where
ds='2012-01-03' and ts='2012-01-03+14:46:31'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src_rc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
+#### A masked pattern was here ####
+POSTHOOK: query: select sum(hash(key)), sum(hash(value)) from src_rc_merge_test_part where
ds='2012-01-03' and ts='2012-01-03+14:46:31'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src_rc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
+#### A masked pattern was here ####
+214	-7678496319
+PREHOOK: query: alter table src_rc_merge_test_part partition (ds='2012-01-03', ts='2012-01-03+14:46:31')
concatenate
+PREHOOK: type: ALTER_PARTITION_MERGE
+PREHOOK: Input: default@src_rc_merge_test_part
+PREHOOK: Output: default@src_rc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
+POSTHOOK: query: alter table src_rc_merge_test_part partition (ds='2012-01-03', ts='2012-01-03+14:46:31')
concatenate
+POSTHOOK: type: ALTER_PARTITION_MERGE
+POSTHOOK: Input: default@src_rc_merge_test_part
+POSTHOOK: Output: default@src_rc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
+PREHOOK: query: select count(1) from src_rc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src_rc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
+#### A masked pattern was here ####
+POSTHOOK: query: select count(1) from src_rc_merge_test_part where ds='2012-01-03' and ts='2012-01-03+14:46:31'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src_rc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
+#### A masked pattern was here ####
+15
+PREHOOK: query: select sum(hash(key)), sum(hash(value)) from src_rc_merge_test_part where
ds='2012-01-03' and ts='2012-01-03+14:46:31'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src_rc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
+#### A masked pattern was here ####
+POSTHOOK: query: select sum(hash(key)), sum(hash(value)) from src_rc_merge_test_part where
ds='2012-01-03' and ts='2012-01-03+14:46:31'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src_rc_merge_test_part@ds=2012-01-03/ts=2012-01-03+14%3A46%3A31
+#### A masked pattern was here ####
+214	-7678496319
+PREHOOK: query: drop table src_rc_merge_test_part
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@src_rc_merge_test_part
+PREHOOK: Output: default@src_rc_merge_test_part
+POSTHOOK: query: drop table src_rc_merge_test_part
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@src_rc_merge_test_part
+POSTHOOK: Output: default@src_rc_merge_test_part



Mime
View raw message