You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by jv...@apache.org on 2010/10/29 01:42:50 UTC
svn commit: r1028549 - in /hive/trunk: ./
ql/src/java/org/apache/hadoop/hive/ql/exec/
ql/src/java/org/apache/hadoop/hive/ql/metadata/
ql/src/java/org/apache/hadoop/hive/ql/parse/
ql/src/java/org/apache/hadoop/hive/ql/plan/ ql/src/test/queries/clientpos...
Author: jvs
Date: Thu Oct 28 23:42:50 2010
New Revision: 1028549
URL: http://svn.apache.org/viewvc?rev=1028549&view=rev
Log:
HIVE-1498. support IDXPROPERTIES on CREATE INDEX
(Marquis Wang via jvs)
Modified:
hive/trunk/CHANGES.txt
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/CreateIndexDesc.java
hive/trunk/ql/src/test/queries/clientpositive/index_creation.q
hive/trunk/ql/src/test/results/clientpositive/index_creation.q.out
Modified: hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hive/trunk/CHANGES.txt?rev=1028549&r1=1028548&r2=1028549&view=diff
==============================================================================
--- hive/trunk/CHANGES.txt (original)
+++ hive/trunk/CHANGES.txt Thu Oct 28 23:42:50 2010
@@ -211,6 +211,9 @@ Trunk - Unreleased
HIVE-1641. add map joined table to distributed cache
(Liyin Tang via He Yongqiang)
+ HIVE-1498. support IDXPROPERTIES on CREATE INDEX
+ (Marquis Wang via jvs)
+
OPTIMIZATIONS
BUG FIXES
Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java?rev=1028549&r1=1028548&r2=1028549&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java Thu Oct 28 23:42:50 2010
@@ -316,8 +316,8 @@ public class DDLTask extends Task<DDLWor
crtIndex.getTableName(), crtIndex.getIndexName(), crtIndex.getIndexTypeHandlerClass(),
crtIndex.getIndexedCols(), crtIndex.getIndexTableName(), crtIndex.getDeferredRebuild(),
crtIndex.getInputFormat(), crtIndex.getOutputFormat(), crtIndex.getSerde(),
- crtIndex.getStorageHandler(), crtIndex.getLocation(), crtIndex.getIdxProps(), crtIndex.getSerdeProps(),
- crtIndex.getCollItemDelim(), crtIndex.getFieldDelim(), crtIndex.getFieldEscape(),
+ crtIndex.getStorageHandler(), crtIndex.getLocation(), crtIndex.getIdxProps(), crtIndex.getTblProps(),
+ crtIndex.getSerdeProps(), crtIndex.getCollItemDelim(), crtIndex.getFieldDelim(), crtIndex.getFieldEscape(),
crtIndex.getLineDelim(), crtIndex.getMapKeyDelim()
);
return 0;
Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java?rev=1028549&r1=1028548&r2=1028549&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java Thu Oct 28 23:42:50 2010
@@ -446,7 +446,7 @@ public class Hive {
List<String> indexedCols, String indexTblName, boolean deferredRebuild,
String inputFormat, String outputFormat, String serde,
String storageHandler, String location,
- Map<String, String> idxProps, Map<String, String> serdeProps,
+ Map<String, String> idxProps, Map<String, String> tblProps, Map<String, String> serdeProps,
String collItemDelim, String fieldDelim, String fieldEscape,
String lineDelim, String mapKeyDelim)
throws HiveException {
@@ -558,6 +558,11 @@ public class Hive {
List<FieldSchema> partKeys = baseTbl.getPartitionKeys();
tt.setPartitionKeys(partKeys);
tt.setTableType(TableType.INDEX_TABLE.toString());
+ if (tblProps != null) {
+ for (Entry<String, String> prop : tblProps.entrySet()) {
+ tt.putToParameters(prop.getKey(), prop.getValue());
+ }
+ }
}
if(!deferredRebuild) {
@@ -568,6 +573,11 @@ public class Hive {
storageDescriptor, params, deferredRebuild);
indexHandler.analyzeIndexDefinition(baseTbl, indexDesc, tt);
+ if (idxProps != null)
+ {
+ indexDesc.getParameters().putAll(idxProps);
+ }
+
this.getMSC().createIndex(indexDesc, tt);
} catch (Exception e) {
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=1028549&r1=1028548&r2=1028549&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 Thu Oct 28 23:42:50 2010
@@ -336,6 +336,7 @@ public class DDLSemanticAnalyzer extends
String indexTableName = null;
boolean deferredRebuild = false;
String location = null;
+ Map<String, String> tblProps = null;
Map<String, String> idxProps = null;
RowFormatParams rowFormatParams = new RowFormatParams();
@@ -362,6 +363,9 @@ public class DDLSemanticAnalyzer extends
location = unescapeSQLString(child.getChild(0).getText());
break;
case HiveParser.TOK_TABLEPROPERTIES:
+ tblProps = DDLSemanticAnalyzer.getProps((ASTNode) child.getChild(0));
+ break;
+ case HiveParser.TOK_INDEXPROPERTIES:
idxProps = DDLSemanticAnalyzer.getProps((ASTNode) child.getChild(0));
break;
case HiveParser.TOK_TABLESERIALIZER:
@@ -379,7 +383,7 @@ public class DDLSemanticAnalyzer extends
CreateIndexDesc crtIndexDesc = new CreateIndexDesc(tableName, indexName,
indexedCols, indexTableName, deferredRebuild, storageFormat.inputFormat, storageFormat.outputFormat,
- storageFormat.storageHandler, typeName, location, idxProps,
+ storageFormat.storageHandler, typeName, location, idxProps, tblProps,
shared.serde, shared.serdeProps, rowFormatParams.collItemDelim,
rowFormatParams.fieldDelim, rowFormatParams.fieldEscape,
rowFormatParams.lineDelim, rowFormatParams.mapKeyDelim);
Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g?rev=1028549&r1=1028548&r2=1028549&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g Thu Oct 28 23:42:50 2010
@@ -167,6 +167,8 @@ TOK_EXPLAIN;
TOK_TABLESERIALIZER;
TOK_TABLEPROPERTIES;
TOK_TABLEPROPLIST;
+TOK_INDEXPROPERTIES;
+TOK_INDEXPROPLIST;
TOK_TABTYPE;
TOK_LIMIT;
TOK_TABLEPROPERTY;
@@ -341,16 +343,20 @@ createIndexStatement
KW_ON KW_TABLE tab=Identifier LPAREN indexedCols=columnNameList RPAREN
KW_AS typeName=StringLiteral
autoRebuild?
+ indexPropertiesPrefixed?
indexTblName?
tableRowFormat?
tableFileFormat?
tableLocation?
+ tablePropertiesPrefixed?
->^(TOK_CREATEINDEX $indexName $typeName $tab $indexedCols
autoRebuild?
+ indexPropertiesPrefixed?
indexTblName?
tableRowFormat?
tableFileFormat?
- tableLocation?)
+ tableLocation?
+ tablePropertiesPrefixed?)
;
autoRebuild
@@ -375,10 +381,17 @@ indexPropertiesPrefixed
;
indexProperties
-@init { msgs.push("table properties"); }
+@init { msgs.push("index properties"); }
+@after { msgs.pop(); }
+ :
+ LPAREN indexPropertiesList RPAREN -> ^(TOK_INDEXPROPERTIES indexPropertiesList)
+ ;
+
+indexPropertiesList
+@init { msgs.push("index properties list"); }
@after { msgs.pop(); }
:
- LPAREN propertiesList RPAREN -> ^(TOK_TABLEPROPERTIES propertiesList)
+ keyValueProperty (COMMA keyValueProperty)* -> ^(TOK_INDEXPROPLIST keyValueProperty+)
;
dropIndexStatement
@@ -593,7 +606,10 @@ alterStatementSuffixClusterbySortby
alterIndexRebuild
@init { msgs.push("update index statement");}
@after {msgs.pop();}
- : KW_ALTER KW_INDEX indexName=Identifier KW_ON base_table_name=Identifier partitionSpec? KW_REBUILD
+ : KW_ALTER KW_INDEX indexName=Identifier
+ KW_ON base_table_name=Identifier
+ partitionSpec?
+ KW_REBUILD
->^(TOK_ALTERINDEX_REBUILD $base_table_name $indexName partitionSpec?)
;
@@ -797,11 +813,11 @@ tableProperties
@init { msgs.push("table properties"); }
@after { msgs.pop(); }
:
- LPAREN propertiesList RPAREN -> ^(TOK_TABLEPROPERTIES propertiesList)
+ LPAREN tablePropertiesList RPAREN -> ^(TOK_TABLEPROPERTIES tablePropertiesList)
;
-propertiesList
-@init { msgs.push("properties list"); }
+tablePropertiesList
+@init { msgs.push("table properties list"); }
@after { msgs.pop(); }
:
keyValueProperty (COMMA keyValueProperty)* -> ^(TOK_TABLEPROPLIST keyValueProperty+)
@@ -1844,7 +1860,7 @@ KW_SERDEPROPERTIES: 'SERDEPROPERTIES';
KW_LIMIT: 'LIMIT';
KW_SET: 'SET';
KW_TBLPROPERTIES: 'TBLPROPERTIES';
-KW_IDXPROPERTIES: 'INDEXPROPERTIES';
+KW_IDXPROPERTIES: 'IDXPROPERTIES';
KW_VALUE_TYPE: '$VALUE$';
KW_ELEM_TYPE: '$ELEM$';
KW_CASE: 'CASE';
Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/CreateIndexDesc.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/CreateIndexDesc.java?rev=1028549&r1=1028548&r2=1028549&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/CreateIndexDesc.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/CreateIndexDesc.java Thu Oct 28 23:42:50 2010
@@ -40,13 +40,14 @@ public class CreateIndexDesc extends DDL
String indexTypeHandlerClass;
String location;
Map<String, String> idxProps;
+ Map<String, String> tblProps;
Map<String, String> serdeProps;
String collItemDelim;
String fieldDelim;
String fieldEscape;
String lineDelim;
String mapKeyDelim;
-
+
public CreateIndexDesc() {
super();
@@ -55,7 +56,7 @@ public class CreateIndexDesc extends DDL
public CreateIndexDesc(String tableName, String indexName,
List<String> indexedCols, String indexTableName, boolean deferredRebuild,
String inputFormat, String outputFormat, String storageHandler,
- String typeName, String location, Map<String, String> idxProps,
+ String typeName, String location, Map<String, String> idxProps, Map<String, String> tblProps,
String serde, Map<String, String> serdeProps, String collItemDelim,
String fieldDelim, String fieldEscape, String lineDelim,
String mapKeyDelim) {
@@ -72,6 +73,7 @@ public class CreateIndexDesc extends DDL
this.indexTypeHandlerClass = typeName;
this.location = location;
this.idxProps = idxProps;
+ this.tblProps = tblProps;
this.serde = serde;
this.serdeProps = serdeProps;
this.collItemDelim = collItemDelim;
@@ -104,7 +106,7 @@ public class CreateIndexDesc extends DDL
public void setIndexedCols(List<String> indexedCols) {
this.indexedCols = indexedCols;
}
-
+
public String getIndexTableName() {
return indexTableName;
}
@@ -112,11 +114,11 @@ public class CreateIndexDesc extends DDL
public void setIndexTableName(String indexTableName) {
this.indexTableName = indexTableName;
}
-
+
public boolean isDeferredRebuild() {
return deferredRebuild;
}
-
+
public boolean getDeferredRebuild() {
return deferredRebuild;
}
@@ -173,6 +175,14 @@ public class CreateIndexDesc extends DDL
this.idxProps = idxProps;
}
+ public Map<String, String> getTblProps() {
+ return tblProps;
+ }
+
+ public void setTblProps(Map<String, String> tblProps) {
+ this.tblProps = tblProps;
+ }
+
public Map<String, String> getSerdeProps() {
return serdeProps;
}
@@ -220,7 +230,7 @@ public class CreateIndexDesc extends DDL
public void setMapKeyDelim(String mapKeyDelim) {
this.mapKeyDelim = mapKeyDelim;
}
-
+
public String getIndexTypeHandlerClass() {
return indexTypeHandlerClass;
}
Modified: hive/trunk/ql/src/test/queries/clientpositive/index_creation.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/index_creation.q?rev=1028549&r1=1028548&r2=1028549&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/index_creation.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/index_creation.q Thu Oct 28 23:42:50 2010
@@ -4,6 +4,8 @@ drop index src_index_4 on src;
drop index src_index_5 on src;
drop index src_index_6 on src;
drop index src_index_7 on src;
+drop index src_index_8 on src;
+drop index src_index_9 on src;
create index src_index_2 on table src(key) as 'compact' WITH DEFERRED REBUILD;
desc extended default__src_src_index_2__;
@@ -23,11 +25,19 @@ desc extended default__src_src_index_6__
create index src_index_7 on table src(key) as 'compact' WITH DEFERRED REBUILD in table src_idx_src_index_7 STORED AS RCFILE;
desc extended src_idx_src_index_7;
+create index src_index_8 on table src(key) as 'compact' WITH DEFERRED REBUILD IDXPROPERTIES ("prop1"="val1", "prop2"="val2");
+desc extended default__src_src_index_8__;
+
+create index src_index_9 on table src(key) as 'compact' WITH DEFERRED REBUILD TBLPROPERTIES ("prop1"="val1", "prop2"="val2");
+desc extended default__src_src_index_9__;
+
drop index src_index_2 on src;
drop index src_index_3 on src;
drop index src_index_4 on src;
drop index src_index_5 on src;
drop index src_index_6 on src;
drop index src_index_7 on src;
+drop index src_index_8 on src;
+drop index src_index_9 on src;
show tables;
Modified: hive/trunk/ql/src/test/results/clientpositive/index_creation.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/index_creation.q.out?rev=1028549&r1=1028548&r2=1028549&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/index_creation.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/index_creation.q.out Thu Oct 28 23:42:50 2010
@@ -22,6 +22,14 @@ PREHOOK: query: drop index src_index_7 o
PREHOOK: type: DROPINDEX
POSTHOOK: query: drop index src_index_7 on src
POSTHOOK: type: DROPINDEX
+PREHOOK: query: drop index src_index_8 on src
+PREHOOK: type: DROPINDEX
+POSTHOOK: query: drop index src_index_8 on src
+POSTHOOK: type: DROPINDEX
+PREHOOK: query: drop index src_index_9 on src
+PREHOOK: type: DROPINDEX
+POSTHOOK: query: drop index src_index_9 on src
+POSTHOOK: type: DROPINDEX
PREHOOK: query: create index src_index_2 on table src(key) as 'compact' WITH DEFERRED REBUILD
PREHOOK: type: CREATEINDEX
POSTHOOK: query: create index src_index_2 on table src(key) as 'compact' WITH DEFERRED REBUILD
@@ -34,7 +42,7 @@ key string default
_bucketname string
_offsets array<bigint>
-Detailed Table Information Table(tableName:default__src_src_index_2__, dbName:default, owner:null, createTime:1286799495, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:_bucketname, type:string, comment:), FieldSchema(name:_offsets, type:array<bigint>, comment:)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/default__src_src_index_2__, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[Order(col:key, order:1)], parameters:{}), partitionKeys:[], parameters:{transient_lastDdlTime=1286799495}, viewOriginalText:null, viewExpandedText:null, tableType:INDEX_TABLE)
+Detailed Table Information Table(tableName:default__src_src_index_2__, dbName:default, owner:null, createTime:1288151391, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:_bucketname, type:string, comment:), FieldSchema(name:_offsets, type:array<bigint>, comment:)], location:pfile:/home/mwang/Projects/hive/build/ql/test/data/warehouse/default__src_src_index_2__, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[Order(col:key, order:1)], parameters:{}), partitionKeys:[], parameters:{transient_lastDdlTime=1288151391}, viewOriginalText:null, viewExpandedText:null, tableType:INDEX_TABLE)
PREHOOK: query: create index src_index_3 on table src(key) as 'compact' WITH DEFERRED REBUILD in table src_idx_src_index_3
PREHOOK: type: CREATEINDEX
POSTHOOK: query: create index src_index_3 on table src(key) as 'compact' WITH DEFERRED REBUILD in table src_idx_src_index_3
@@ -47,7 +55,7 @@ key string default
_bucketname string
_offsets array<bigint>
-Detailed Table Information Table(tableName:src_idx_src_index_3, dbName:default, owner:null, createTime:1286799495, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:_bucketname, type:string, comment:), FieldSchema(name:_offsets, type:array<bigint>, comment:)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/src_idx_src_index_3, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[Order(col:key, order:1)], parameters:{}), partitionKeys:[], parameters:{transient_lastDdlTime=1286799495}, viewOriginalText:null, viewExpandedText:null, tableType:INDEX_TABLE)
+Detailed Table Information Table(tableName:src_idx_src_index_3, dbName:default, owner:null, createTime:1288151391, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:_bucketname, type:string, comment:), FieldSchema(name:_offsets, type:array<bigint>, comment:)], location:pfile:/home/mwang/Projects/hive/build/ql/test/data/warehouse/src_idx_src_index_3, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[Order(col:key, order:1)], parameters:{}), partitionKeys:[], parameters:{transient_lastDdlTime=1288151391}, viewOriginalText:null, viewExpandedText:null, tableType:INDEX_TABLE)
PREHOOK: query: create index src_index_4 on table src(key) as 'compact' WITH DEFERRED REBUILD ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' STORED AS TEXTFILE
PREHOOK: type: CREATEINDEX
POSTHOOK: query: create index src_index_4 on table src(key) as 'compact' WITH DEFERRED REBUILD ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' STORED AS TEXTFILE
@@ -60,7 +68,7 @@ key string default
_bucketname string
_offsets array<bigint>
-Detailed Table Information Table(tableName:default__src_src_index_4__, dbName:default, owner:null, createTime:1286799495, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:_bucketname, type:string, comment:), FieldSchema(name:_offsets, type:array<bigint>, comment:)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/default__src_src_index_4__, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format= , field.delim=
+Detailed Table Information Table(tableName:default__src_src_index_4__, dbName:default, owner:null, createTime:1288151391, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:_bucketname, type:string, comment:), FieldSchema(name:_offsets, type:array<bigint>, comment:)], location:pfile:/home/mwang/Projects/hive/build/ql/test/data/warehouse/default__src_src_index_4__, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format= , field.delim=
PREHOOK: query: create index src_index_5 on table src(key) as 'compact' WITH DEFERRED REBUILD ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' ESCAPED BY '\\'
PREHOOK: type: CREATEINDEX
POSTHOOK: query: create index src_index_5 on table src(key) as 'compact' WITH DEFERRED REBUILD ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' ESCAPED BY '\\'
@@ -73,7 +81,7 @@ key string default
_bucketname string
_offsets array<bigint>
-Detailed Table Information Table(tableName:default__src_src_index_5__, dbName:default, owner:null, createTime:1286799495, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:_bucketname, type:string, comment:), FieldSchema(name:_offsets, type:array<bigint>, comment:)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/default__src_src_index_5__, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{escape.delim=\, serialization.format= , field.delim=
+Detailed Table Information Table(tableName:default__src_src_index_5__, dbName:default, owner:null, createTime:1288151391, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:_bucketname, type:string, comment:), FieldSchema(name:_offsets, type:array<bigint>, comment:)], location:pfile:/home/mwang/Projects/hive/build/ql/test/data/warehouse/default__src_src_index_5__, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{escape.delim=\, serialization.format= , field.delim=
PREHOOK: query: create index src_index_6 on table src(key) as 'compact' WITH DEFERRED REBUILD STORED AS RCFILE
PREHOOK: type: CREATEINDEX
POSTHOOK: query: create index src_index_6 on table src(key) as 'compact' WITH DEFERRED REBUILD STORED AS RCFILE
@@ -86,7 +94,7 @@ key string from deserializer
_bucketname string from deserializer
_offsets array<bigint> from deserializer
-Detailed Table Information Table(tableName:default__src_src_index_6__, dbName:default, owner:null, createTime:1286799495, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:_bucketname, type:string, comment:), FieldSchema(name:_offsets, type:array<bigint>, comment:)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/default__src_src_index_6__, inputFormat:org.apache.hadoop.hive.ql.io.RCFileInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.RCFileOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[Order(col:key, order:1)], parameters:{}), partitionKeys:[], parameters:{transient_lastDdlTime=1286799495}, viewOriginalText:null, viewExpandedText:null, tableType:INDEX_TABLE)
+Detailed Table Information Table(tableName:default__src_src_index_6__, dbName:default, owner:null, createTime:1288151392, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:_bucketname, type:string, comment:), FieldSchema(name:_offsets, type:array<bigint>, comment:)], location:pfile:/home/mwang/Projects/hive/build/ql/test/data/warehouse/default__src_src_index_6__, inputFormat:org.apache.hadoop.hive.ql.io.RCFileInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.RCFileOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[Order(col:key, order:1)], parameters:{}), partitionKeys:[], parameters:{transient_lastDdlTime=1288151392}, viewOriginalText:null, viewExpandedText:null, tableType:INDEX_TABLE)
PREHOOK: query: create index src_index_7 on table src(key) as 'compact' WITH DEFERRED REBUILD in table src_idx_src_index_7 STORED AS RCFILE
PREHOOK: type: CREATEINDEX
POSTHOOK: query: create index src_index_7 on table src(key) as 'compact' WITH DEFERRED REBUILD in table src_idx_src_index_7 STORED AS RCFILE
@@ -99,7 +107,33 @@ key string from deserializer
_bucketname string from deserializer
_offsets array<bigint> from deserializer
-Detailed Table Information Table(tableName:src_idx_src_index_7, dbName:default, owner:null, createTime:1286799495, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:_bucketname, type:string, comment:), FieldSchema(name:_offsets, type:array<bigint>, comment:)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/src_idx_src_index_7, inputFormat:org.apache.hadoop.hive.ql.io.RCFileInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.RCFileOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[Order(col:key, order:1)], parameters:{}), partitionKeys:[], parameters:{transient_lastDdlTime=1286799495}, viewOriginalText:null, viewExpandedText:null, tableType:INDEX_TABLE)
+Detailed Table Information Table(tableName:src_idx_src_index_7, dbName:default, owner:null, createTime:1288151392, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:_bucketname, type:string, comment:), FieldSchema(name:_offsets, type:array<bigint>, comment:)], location:pfile:/home/mwang/Projects/hive/build/ql/test/data/warehouse/src_idx_src_index_7, inputFormat:org.apache.hadoop.hive.ql.io.RCFileInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.RCFileOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[Order(col:key, order:1)], parameters:{}), partitionKeys:[], parameters:{transient_lastDdlTime=1288151392}, viewOriginalText:null, viewExpandedText:null, tableType:INDEX_TABLE)
+PREHOOK: query: create index src_index_8 on table src(key) as 'compact' WITH DEFERRED REBUILD IDXPROPERTIES ("prop1"="val1", "prop2"="val2")
+PREHOOK: type: CREATEINDEX
+POSTHOOK: query: create index src_index_8 on table src(key) as 'compact' WITH DEFERRED REBUILD IDXPROPERTIES ("prop1"="val1", "prop2"="val2")
+POSTHOOK: type: CREATEINDEX
+PREHOOK: query: desc extended default__src_src_index_8__
+PREHOOK: type: DESCTABLE
+POSTHOOK: query: desc extended default__src_src_index_8__
+POSTHOOK: type: DESCTABLE
+key string default
+_bucketname string
+_offsets array<bigint>
+
+Detailed Table Information Table(tableName:default__src_src_index_8__, dbName:default, owner:null, createTime:1288151392, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:_bucketname, type:string, comment:), FieldSchema(name:_offsets, type:array<bigint>, comment:)], location:pfile:/home/mwang/Projects/hive/build/ql/test/data/warehouse/default__src_src_index_8__, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[Order(col:key, order:1)], parameters:{}), partitionKeys:[], parameters:{transient_lastDdlTime=1288151392}, viewOriginalText:null, viewExpandedText:null, tableType:INDEX_TABLE)
+PREHOOK: query: create index src_index_9 on table src(key) as 'compact' WITH DEFERRED REBUILD TBLPROPERTIES ("prop1"="val1", "prop2"="val2")
+PREHOOK: type: CREATEINDEX
+POSTHOOK: query: create index src_index_9 on table src(key) as 'compact' WITH DEFERRED REBUILD TBLPROPERTIES ("prop1"="val1", "prop2"="val2")
+POSTHOOK: type: CREATEINDEX
+PREHOOK: query: desc extended default__src_src_index_9__
+PREHOOK: type: DESCTABLE
+POSTHOOK: query: desc extended default__src_src_index_9__
+POSTHOOK: type: DESCTABLE
+key string default
+_bucketname string
+_offsets array<bigint>
+
+Detailed Table Information Table(tableName:default__src_src_index_9__, dbName:default, owner:null, createTime:1288151392, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:_bucketname, type:string, comment:), FieldSchema(name:_offsets, type:array<bigint>, comment:)], location:pfile:/home/mwang/Projects/hive/build/ql/test/data/warehouse/default__src_src_index_9__, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[Order(col:key, order:1)], parameters:{}), partitionKeys:[], parameters:{prop2=val2, prop1=val1, transient_lastDdlTime=1288151392}, viewOriginalText:null, viewExpandedText:null, tableType:INDEX_TABLE)
PREHOOK: query: drop index src_index_2 on src
PREHOOK: type: DROPINDEX
POSTHOOK: query: drop index src_index_2 on src
@@ -124,6 +158,14 @@ PREHOOK: query: drop index src_index_7 o
PREHOOK: type: DROPINDEX
POSTHOOK: query: drop index src_index_7 on src
POSTHOOK: type: DROPINDEX
+PREHOOK: query: drop index src_index_8 on src
+PREHOOK: type: DROPINDEX
+POSTHOOK: query: drop index src_index_8 on src
+POSTHOOK: type: DROPINDEX
+PREHOOK: query: drop index src_index_9 on src
+PREHOOK: type: DROPINDEX
+POSTHOOK: query: drop index src_index_9 on src
+POSTHOOK: type: DROPINDEX
PREHOOK: query: show tables
PREHOOK: type: SHOWTABLES
POSTHOOK: query: show tables