hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xu...@apache.org
Subject svn commit: r1601717 - in /hive/trunk/ql/src: java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java test/queries/clientpositive/alter_file_format.q test/results/clientpositive/alter_file_format.q.out
Date Tue, 10 Jun 2014 18:17:40 GMT
Author: xuefu
Date: Tue Jun 10 18:17:40 2014
New Revision: 1601717

URL: http://svn.apache.org/r1601717
Log:
HIVE-7199: Cannot alter table to parquet (Vasanth via Xuefu)

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

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=1601717&r1=1601716&r2=1601717&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 Tue Jun
10 18:17:40 2014
@@ -1368,6 +1368,11 @@ public class DDLSemanticAnalyzer extends
       outputFormat = ORCFILE_OUTPUT;
       serde = ORCFILE_SERDE;
       break;
+    case HiveParser.TOK_TBLPARQUETFILE:
+      inputFormat = PARQUETFILE_INPUT;
+      outputFormat = PARQUETFILE_OUTPUT;
+      serde = PARQUETFILE_SERDE;
+      break;
     case HiveParser.TOK_FILEFORMAT_GENERIC:
       handleGenericFileFormat(child);
       break;

Modified: hive/trunk/ql/src/test/queries/clientpositive/alter_file_format.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/alter_file_format.q?rev=1601717&r1=1601716&r2=1601717&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/alter_file_format.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/alter_file_format.q Tue Jun 10 18:17:40
2014
@@ -13,6 +13,9 @@ desc FORMATTED alter_file_format_test;
 alter table alter_file_format_test set fileformat sequencefile;
 desc FORMATTED alter_file_format_test;
 
+alter table alter_file_format_test set fileformat parquet;
+desc FORMATTED alter_file_format_test;
+
 ALTER TABLE alter_file_format_test SET FILEFORMAT INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat' SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe';
 desc FORMATTED alter_file_format_test;
 
@@ -36,4 +39,7 @@ desc FORMATTED alter_partition_format_te
 alter table alter_partition_format_test partition(ds='2010') set fileformat sequencefile;
 desc FORMATTED alter_partition_format_test partition(ds='2010');
 
+alter table alter_partition_format_test partition(ds='2010') set fileformat parquet;
+desc FORMATTED alter_partition_format_test partition(ds='2010');
+
 drop table alter_partition_format_test;
\ No newline at end of file

Modified: hive/trunk/ql/src/test/results/clientpositive/alter_file_format.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/alter_file_format.q.out?rev=1601717&r1=1601716&r2=1601717&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/alter_file_format.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/alter_file_format.q.out Tue Jun 10 18:17:40
2014
@@ -216,6 +216,51 @@ Bucket Columns:     	[]                 
 Sort Columns:       	[]                  	 
 Storage Desc Params:	 	 
 	serialization.format	1                   
+PREHOOK: query: alter table alter_file_format_test set fileformat parquet
+PREHOOK: type: ALTERTABLE_FILEFORMAT
+PREHOOK: Input: default@alter_file_format_test
+PREHOOK: Output: default@alter_file_format_test
+POSTHOOK: query: alter table alter_file_format_test set fileformat parquet
+POSTHOOK: type: ALTERTABLE_FILEFORMAT
+POSTHOOK: Input: default@alter_file_format_test
+POSTHOOK: Output: default@alter_file_format_test
+PREHOOK: query: desc FORMATTED alter_file_format_test
+PREHOOK: type: DESCTABLE
+PREHOOK: Input: default@alter_file_format_test
+POSTHOOK: query: desc FORMATTED alter_file_format_test
+POSTHOOK: type: DESCTABLE
+POSTHOOK: Input: default@alter_file_format_test
+# col_name            	data_type           	comment             
+	 	 
+key                 	int                 	                    
+value               	string              	                    
+	 	 
+# Detailed Table Information	 	 
+Database:           	default             	 
+#### A masked pattern was here ####
+Protect Mode:       	None                	 
+Retention:          	0                   	 
+#### A masked pattern was here ####
+Table Type:         	MANAGED_TABLE       	 
+Table Parameters:	 	 
+	COLUMN_STATS_ACCURATE	false               
+#### A masked pattern was here ####
+	numFiles            	0                   
+	numRows             	-1                  
+	rawDataSize         	-1                  
+	totalSize           	0                   
+#### A masked pattern was here ####
+	 	 
+# Storage Information	 	 
+SerDe Library:      	org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe	 
+InputFormat:        	org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat	 
+OutputFormat:       	org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat	 
+Compressed:         	No                  	 
+Num Buckets:        	-1                  	 
+Bucket Columns:     	[]                  	 
+Sort Columns:       	[]                  	 
+Storage Desc Params:	 	 
+	serialization.format	1                   
 PREHOOK: query: ALTER TABLE alter_file_format_test SET FILEFORMAT INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat' SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
 PREHOOK: type: ALTERTABLE_FILEFORMAT
 PREHOOK: Input: default@alter_file_format_test
@@ -521,6 +566,57 @@ Bucket Columns:     	[]                 
 Sort Columns:       	[]                  	 
 Storage Desc Params:	 	 
 	serialization.format	1                   
+PREHOOK: query: alter table alter_partition_format_test partition(ds='2010') set fileformat
parquet
+PREHOOK: type: ALTERPARTITION_FILEFORMAT
+PREHOOK: Input: default@alter_partition_format_test
+PREHOOK: Output: default@alter_partition_format_test@ds=2010
+POSTHOOK: query: alter table alter_partition_format_test partition(ds='2010') set fileformat
parquet
+POSTHOOK: type: ALTERPARTITION_FILEFORMAT
+POSTHOOK: Input: default@alter_partition_format_test
+POSTHOOK: Input: default@alter_partition_format_test@ds=2010
+POSTHOOK: Output: default@alter_partition_format_test@ds=2010
+PREHOOK: query: desc FORMATTED alter_partition_format_test partition(ds='2010')
+PREHOOK: type: DESCTABLE
+PREHOOK: Input: default@alter_partition_format_test
+POSTHOOK: query: desc FORMATTED alter_partition_format_test partition(ds='2010')
+POSTHOOK: type: DESCTABLE
+POSTHOOK: Input: default@alter_partition_format_test
+# col_name            	data_type           	comment             
+	 	 
+key                 	int                 	                    
+value               	string              	                    
+	 	 
+# Partition Information	 	 
+# col_name            	data_type           	comment             
+	 	 
+ds                  	string              	                    
+	 	 
+# Detailed Partition Information	 	 
+Partition Value:    	[2010]              	 
+Database:           	default             	 
+Table:              	alter_partition_format_test	 
+#### A masked pattern was here ####
+Protect Mode:       	None                	 
+#### A masked pattern was here ####
+Partition Parameters:	 	 
+	COLUMN_STATS_ACCURATE	false               
+#### A masked pattern was here ####
+	numFiles            	0                   
+	numRows             	-1                  
+	rawDataSize         	-1                  
+	totalSize           	0                   
+#### A masked pattern was here ####
+	 	 
+# Storage Information	 	 
+SerDe Library:      	org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe	 
+InputFormat:        	org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat	 
+OutputFormat:       	org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat	 
+Compressed:         	No                  	 
+Num Buckets:        	-1                  	 
+Bucket Columns:     	[]                  	 
+Sort Columns:       	[]                  	 
+Storage Desc Params:	 	 
+	serialization.format	1                   
 PREHOOK: query: drop table alter_partition_format_test
 PREHOOK: type: DROPTABLE
 PREHOOK: Input: default@alter_partition_format_test



Mime
View raw message