hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1033775 - in /hive/trunk: ./ ql/src/java/org/apache/hadoop/hive/ql/index/compact/ ql/src/java/org/apache/hadoop/hive/ql/metadata/ ql/src/test/queries/clientpositive/ ql/src/test/results/clientpositive/
Date Wed, 10 Nov 2010 23:20:17 GMT
Author: jvs
Date: Wed Nov 10 23:20:16 2010
New Revision: 1033775

URL: http://svn.apache.org/viewvc?rev=1033775&view=rev
Log:
HIVE-1501 when generating reentrant INSERT for index rebuild,
quote identifiers using backticks
(Skye Berghel via jvs)


Modified:
    hive/trunk/CHANGES.txt
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/index/compact/CompactIndexHandler.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveUtils.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=1033775&r1=1033774&r2=1033775&view=diff
==============================================================================
--- hive/trunk/CHANGES.txt (original)
+++ hive/trunk/CHANGES.txt Wed Nov 10 23:20:16 2010
@@ -470,6 +470,10 @@ Trunk -  Unreleased
     HIVE-1771 Fix bug in UDF round
     (John Sichi via namit)
 
+    HIVE-1501 when generating reentrant INSERT for index rebuild,
+    quote identifiers using backticks
+    (Skye Berghel via jvs)
+
   TESTS
 
     HIVE-1464. improve  test query performance

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/index/compact/CompactIndexHandler.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/index/compact/CompactIndexHandler.java?rev=1033775&r1=1033774&r2=1033775&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/index/compact/CompactIndexHandler.java
(original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/index/compact/CompactIndexHandler.java
Wed Nov 10 23:20:16 2010
@@ -125,13 +125,13 @@ public class CompactIndexHandler extends
       PartitionDesc indexTblPartDesc, String indexTableName,
       PartitionDesc baseTablePartDesc, String baseTableName, String dbName) {
     
-    String indexCols = MetaStoreUtils.getColumnNamesFromFieldSchema(indexField);
+    String indexCols = HiveUtils.getUnparsedColumnNamesFromFieldSchema(indexField);
 
     //form a new insert overwrite query.
     StringBuilder command= new StringBuilder();
     LinkedHashMap<String, String> partSpec = indexTblPartDesc.getPartSpec();
 
-    command.append("INSERT OVERWRITE TABLE " + indexTableName );
+    command.append("INSERT OVERWRITE TABLE " + HiveUtils.unparseIdentifier(indexTableName
));
     if (partitioned && indexTblPartDesc != null) {
       command.append(" PARTITION ( ");
       List<String> ret = getPartKVPairStringArray(partSpec);
@@ -153,7 +153,7 @@ public class CompactIndexHandler extends
     command.append(" collect_set (");
     command.append(VirtualColumn.BLOCKOFFSET.getName());
     command.append(") ");
-    command.append(" FROM " + baseTableName );
+    command.append(" FROM " + HiveUtils.unparseIdentifier(baseTableName) );
     LinkedHashMap<String, String> basePartSpec = baseTablePartDesc.getPartSpec();
     if(basePartSpec != null) {
       command.append(" WHERE ");

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveUtils.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveUtils.java?rev=1033775&r1=1033774&r2=1033775&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveUtils.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveUtils.java Wed Nov 10 23:20:16
2010
@@ -18,12 +18,15 @@
 
 package org.apache.hadoop.hive.ql.metadata;
 
+import java.util.List;
+
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hive.common.JavaUtils;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.ql.index.HiveIndexHandler;
 import org.apache.hadoop.hive.ql.parse.AbstractSemanticAnalyzerHook;
 import org.apache.hadoop.util.ReflectionUtils;
+import org.apache.hadoop.hive.metastore.api.FieldSchema;
 
 /**
  * General collection of helper functions.
@@ -183,4 +186,20 @@ public final class HiveUtils {
     }
 
   }
+
+
+    /**
+     * Convert FieldSchemas to columnNames with backticks around them.
+     */
+    public static String getUnparsedColumnNamesFromFieldSchema(
+        List<FieldSchema> fieldSchemas) {
+      StringBuilder sb = new StringBuilder();
+      for (int i = 0; i < fieldSchemas.size(); i++) {
+        if (i > 0) {
+          sb.append(",");
+        }
+        sb.append(HiveUtils.unparseIdentifier(fieldSchemas.get(i).getName()));
+      }
+      return sb.toString();
+    }
 }

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=1033775&r1=1033774&r2=1033775&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/index_creation.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/index_creation.q Wed Nov 10 23:20:16 2010
@@ -6,6 +6,7 @@ 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;
+drop table `_t`;
 
 create index src_index_2 on table src(key) as 'compact' WITH DEFERRED REBUILD;
 desc extended default__src_src_index_2__;
@@ -31,6 +32,14 @@ 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__;
 
+create table `_t`(`_i` int, `_j` int);
+create index x on table `_t`(`_j`) as 'compact' WITH DEFERRED REBUILD;
+alter index x on `_t` rebuild;
+
+create index x2 on table `_t`(`_i`,`_j`) as 'compact' WITH DEFERRED
+REBUILD;
+alter index x2 on `_t` rebuild;
+
 drop index src_index_2 on src;
 drop index src_index_3 on src;
 drop index src_index_4 on src;
@@ -39,5 +48,6 @@ 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;
+drop table `_t`;
 
 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=1033775&r1=1033774&r2=1033775&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 Wed Nov 10 23:20:16
2010
@@ -30,6 +30,10 @@ PREHOOK: query: drop index src_index_9 o
 PREHOOK: type: DROPINDEX
 POSTHOOK: query: drop index src_index_9 on src
 POSTHOOK: type: DROPINDEX
+PREHOOK: query: drop table `_t`
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table `_t`
+POSTHOOK: type: DROPTABLE
 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
@@ -42,7 +46,7 @@ key	string	default
 _bucketname	string	
 _offsets	array<bigint>	
 	 	 
-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)	
+Detailed Table Information	Table(tableName:default__src_src_index_2__, dbName:default, owner:null,
createTime:1288754830, 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/skye/Documents/github-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=1288754830}, 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
@@ -55,7 +59,7 @@ key	string	default
 _bucketname	string	
 _offsets	array<bigint>	
 	 	 
-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)	
+Detailed Table Information	Table(tableName:src_idx_src_index_3, dbName:default, owner:null,
createTime:1288754830, 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/skye/Documents/github-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=1288754830}, 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
@@ -68,7 +72,7 @@ key	string	default
 _bucketname	string	
 _offsets	array<bigint>	
 	 	 
-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=
+Detailed Table Information	Table(tableName:default__src_src_index_4__, dbName:default, owner:null,
createTime:1288754830, 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/skye/Documents/github-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 '\\'
@@ -81,7 +85,7 @@ key	string	default
 _bucketname	string	
 _offsets	array<bigint>	
 	 	 
-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=
+Detailed Table Information	Table(tableName:default__src_src_index_5__, dbName:default, owner:null,
createTime:1288754830, 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/skye/Documents/github-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
@@ -94,7 +98,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: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)	
+Detailed Table Information	Table(tableName:default__src_src_index_6__, dbName:default, owner:null,
createTime:1288754831, 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/skye/Documents/github-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=1288754831}, 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
@@ -107,7 +111,7 @@ 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: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)	
+Detailed Table Information	Table(tableName:src_idx_src_index_7, dbName:default, owner:null,
createTime:1288754831, 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/skye/Documents/github-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=1288754831}, 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")
@@ -120,7 +124,7 @@ 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)	
+Detailed Table Information	Table(tableName:default__src_src_index_8__, dbName:default, owner:null,
createTime:1288754831, 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/skye/Documents/github-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=1288754831}, 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")
@@ -133,43 +137,165 @@ 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)	
+Detailed Table Information	Table(tableName:default__src_src_index_9__, dbName:default, owner:null,
createTime:1288754831, 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/skye/Documents/github-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=1288754831}, viewOriginalText:null,
viewExpandedText:null, tableType:INDEX_TABLE)	
+PREHOOK: query: create table `_t`(`_i` int, `_j` int)
+PREHOOK: type: CREATETABLE
+POSTHOOK: query: create table `_t`(`_i` int, `_j` int)
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: default@_t
+PREHOOK: query: create index x on table `_t`(`_j`) as 'compact' WITH DEFERRED REBUILD
+PREHOOK: type: CREATEINDEX
+POSTHOOK: query: create index x on table `_t`(`_j`) as 'compact' WITH DEFERRED REBUILD
+POSTHOOK: type: CREATEINDEX
+PREHOOK: query: alter index x on `_t` rebuild
+PREHOOK: type: QUERY
+PREHOOK: Input: default@_t
+PREHOOK: Output: default@default___t_x__
+POSTHOOK: query: alter index x on `_t` rebuild
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@_t
+POSTHOOK: Output: default@default___t_x__
+POSTHOOK: Lineage: default___t_x__._bucketname SIMPLE [(_t)_t.FieldSchema(name:INPUT__FILE__NAME,
type:string, comment:), ]
+POSTHOOK: Lineage: default___t_x__._j SIMPLE [(_t)_t.FieldSchema(name:_j, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x__._offsets EXPRESSION [(_t)_t.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE,
type:bigint, comment:), ]
+PREHOOK: query: create index x2 on table `_t`(`_i`,`_j`) as 'compact' WITH DEFERRED
+REBUILD
+PREHOOK: type: CREATEINDEX
+POSTHOOK: query: create index x2 on table `_t`(`_i`,`_j`) as 'compact' WITH DEFERRED
+REBUILD
+POSTHOOK: type: CREATEINDEX
+POSTHOOK: Lineage: default___t_x__._bucketname SIMPLE [(_t)_t.FieldSchema(name:INPUT__FILE__NAME,
type:string, comment:), ]
+POSTHOOK: Lineage: default___t_x__._j SIMPLE [(_t)_t.FieldSchema(name:_j, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x__._offsets EXPRESSION [(_t)_t.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE,
type:bigint, comment:), ]
+PREHOOK: query: alter index x2 on `_t` rebuild
+PREHOOK: type: QUERY
+PREHOOK: Input: default@_t
+PREHOOK: Output: default@default___t_x2__
+POSTHOOK: query: alter index x2 on `_t` rebuild
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@_t
+POSTHOOK: Output: default@default___t_x2__
+POSTHOOK: Lineage: default___t_x2__._bucketname SIMPLE [(_t)_t.FieldSchema(name:INPUT__FILE__NAME,
type:string, comment:), ]
+POSTHOOK: Lineage: default___t_x2__._i SIMPLE [(_t)_t.FieldSchema(name:_i, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x2__._j SIMPLE [(_t)_t.FieldSchema(name:_j, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x2__._offsets EXPRESSION [(_t)_t.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE,
type:bigint, comment:), ]
+POSTHOOK: Lineage: default___t_x__._bucketname SIMPLE [(_t)_t.FieldSchema(name:INPUT__FILE__NAME,
type:string, comment:), ]
+POSTHOOK: Lineage: default___t_x__._j SIMPLE [(_t)_t.FieldSchema(name:_j, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x__._offsets EXPRESSION [(_t)_t.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE,
type:bigint, comment:), ]
 PREHOOK: query: drop index src_index_2 on src
 PREHOOK: type: DROPINDEX
 POSTHOOK: query: drop index src_index_2 on src
 POSTHOOK: type: DROPINDEX
+POSTHOOK: Lineage: default___t_x2__._bucketname SIMPLE [(_t)_t.FieldSchema(name:INPUT__FILE__NAME,
type:string, comment:), ]
+POSTHOOK: Lineage: default___t_x2__._i SIMPLE [(_t)_t.FieldSchema(name:_i, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x2__._j SIMPLE [(_t)_t.FieldSchema(name:_j, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x2__._offsets EXPRESSION [(_t)_t.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE,
type:bigint, comment:), ]
+POSTHOOK: Lineage: default___t_x__._bucketname SIMPLE [(_t)_t.FieldSchema(name:INPUT__FILE__NAME,
type:string, comment:), ]
+POSTHOOK: Lineage: default___t_x__._j SIMPLE [(_t)_t.FieldSchema(name:_j, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x__._offsets EXPRESSION [(_t)_t.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE,
type:bigint, comment:), ]
 PREHOOK: query: drop index src_index_3 on src
 PREHOOK: type: DROPINDEX
 POSTHOOK: query: drop index src_index_3 on src
 POSTHOOK: type: DROPINDEX
+POSTHOOK: Lineage: default___t_x2__._bucketname SIMPLE [(_t)_t.FieldSchema(name:INPUT__FILE__NAME,
type:string, comment:), ]
+POSTHOOK: Lineage: default___t_x2__._i SIMPLE [(_t)_t.FieldSchema(name:_i, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x2__._j SIMPLE [(_t)_t.FieldSchema(name:_j, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x2__._offsets EXPRESSION [(_t)_t.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE,
type:bigint, comment:), ]
+POSTHOOK: Lineage: default___t_x__._bucketname SIMPLE [(_t)_t.FieldSchema(name:INPUT__FILE__NAME,
type:string, comment:), ]
+POSTHOOK: Lineage: default___t_x__._j SIMPLE [(_t)_t.FieldSchema(name:_j, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x__._offsets EXPRESSION [(_t)_t.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE,
type:bigint, comment:), ]
 PREHOOK: query: drop index src_index_4 on src
 PREHOOK: type: DROPINDEX
 POSTHOOK: query: drop index src_index_4 on src
 POSTHOOK: type: DROPINDEX
+POSTHOOK: Lineage: default___t_x2__._bucketname SIMPLE [(_t)_t.FieldSchema(name:INPUT__FILE__NAME,
type:string, comment:), ]
+POSTHOOK: Lineage: default___t_x2__._i SIMPLE [(_t)_t.FieldSchema(name:_i, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x2__._j SIMPLE [(_t)_t.FieldSchema(name:_j, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x2__._offsets EXPRESSION [(_t)_t.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE,
type:bigint, comment:), ]
+POSTHOOK: Lineage: default___t_x__._bucketname SIMPLE [(_t)_t.FieldSchema(name:INPUT__FILE__NAME,
type:string, comment:), ]
+POSTHOOK: Lineage: default___t_x__._j SIMPLE [(_t)_t.FieldSchema(name:_j, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x__._offsets EXPRESSION [(_t)_t.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE,
type:bigint, comment:), ]
 PREHOOK: query: drop index src_index_5 on src
 PREHOOK: type: DROPINDEX
 POSTHOOK: query: drop index src_index_5 on src
 POSTHOOK: type: DROPINDEX
+POSTHOOK: Lineage: default___t_x2__._bucketname SIMPLE [(_t)_t.FieldSchema(name:INPUT__FILE__NAME,
type:string, comment:), ]
+POSTHOOK: Lineage: default___t_x2__._i SIMPLE [(_t)_t.FieldSchema(name:_i, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x2__._j SIMPLE [(_t)_t.FieldSchema(name:_j, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x2__._offsets EXPRESSION [(_t)_t.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE,
type:bigint, comment:), ]
+POSTHOOK: Lineage: default___t_x__._bucketname SIMPLE [(_t)_t.FieldSchema(name:INPUT__FILE__NAME,
type:string, comment:), ]
+POSTHOOK: Lineage: default___t_x__._j SIMPLE [(_t)_t.FieldSchema(name:_j, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x__._offsets EXPRESSION [(_t)_t.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE,
type:bigint, comment:), ]
 PREHOOK: query: drop index src_index_6 on src
 PREHOOK: type: DROPINDEX
 POSTHOOK: query: drop index src_index_6 on src
 POSTHOOK: type: DROPINDEX
+POSTHOOK: Lineage: default___t_x2__._bucketname SIMPLE [(_t)_t.FieldSchema(name:INPUT__FILE__NAME,
type:string, comment:), ]
+POSTHOOK: Lineage: default___t_x2__._i SIMPLE [(_t)_t.FieldSchema(name:_i, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x2__._j SIMPLE [(_t)_t.FieldSchema(name:_j, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x2__._offsets EXPRESSION [(_t)_t.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE,
type:bigint, comment:), ]
+POSTHOOK: Lineage: default___t_x__._bucketname SIMPLE [(_t)_t.FieldSchema(name:INPUT__FILE__NAME,
type:string, comment:), ]
+POSTHOOK: Lineage: default___t_x__._j SIMPLE [(_t)_t.FieldSchema(name:_j, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x__._offsets EXPRESSION [(_t)_t.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE,
type:bigint, comment:), ]
 PREHOOK: query: drop index src_index_7 on src
 PREHOOK: type: DROPINDEX
 POSTHOOK: query: drop index src_index_7 on src
 POSTHOOK: type: DROPINDEX
+POSTHOOK: Lineage: default___t_x2__._bucketname SIMPLE [(_t)_t.FieldSchema(name:INPUT__FILE__NAME,
type:string, comment:), ]
+POSTHOOK: Lineage: default___t_x2__._i SIMPLE [(_t)_t.FieldSchema(name:_i, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x2__._j SIMPLE [(_t)_t.FieldSchema(name:_j, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x2__._offsets EXPRESSION [(_t)_t.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE,
type:bigint, comment:), ]
+POSTHOOK: Lineage: default___t_x__._bucketname SIMPLE [(_t)_t.FieldSchema(name:INPUT__FILE__NAME,
type:string, comment:), ]
+POSTHOOK: Lineage: default___t_x__._j SIMPLE [(_t)_t.FieldSchema(name:_j, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x__._offsets EXPRESSION [(_t)_t.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE,
type:bigint, comment:), ]
 PREHOOK: query: drop index src_index_8 on src
 PREHOOK: type: DROPINDEX
 POSTHOOK: query: drop index src_index_8 on src
 POSTHOOK: type: DROPINDEX
+POSTHOOK: Lineage: default___t_x2__._bucketname SIMPLE [(_t)_t.FieldSchema(name:INPUT__FILE__NAME,
type:string, comment:), ]
+POSTHOOK: Lineage: default___t_x2__._i SIMPLE [(_t)_t.FieldSchema(name:_i, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x2__._j SIMPLE [(_t)_t.FieldSchema(name:_j, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x2__._offsets EXPRESSION [(_t)_t.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE,
type:bigint, comment:), ]
+POSTHOOK: Lineage: default___t_x__._bucketname SIMPLE [(_t)_t.FieldSchema(name:INPUT__FILE__NAME,
type:string, comment:), ]
+POSTHOOK: Lineage: default___t_x__._j SIMPLE [(_t)_t.FieldSchema(name:_j, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x__._offsets EXPRESSION [(_t)_t.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE,
type:bigint, comment:), ]
 PREHOOK: query: drop index src_index_9 on src
 PREHOOK: type: DROPINDEX
 POSTHOOK: query: drop index src_index_9 on src
 POSTHOOK: type: DROPINDEX
+POSTHOOK: Lineage: default___t_x2__._bucketname SIMPLE [(_t)_t.FieldSchema(name:INPUT__FILE__NAME,
type:string, comment:), ]
+POSTHOOK: Lineage: default___t_x2__._i SIMPLE [(_t)_t.FieldSchema(name:_i, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x2__._j SIMPLE [(_t)_t.FieldSchema(name:_j, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x2__._offsets EXPRESSION [(_t)_t.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE,
type:bigint, comment:), ]
+POSTHOOK: Lineage: default___t_x__._bucketname SIMPLE [(_t)_t.FieldSchema(name:INPUT__FILE__NAME,
type:string, comment:), ]
+POSTHOOK: Lineage: default___t_x__._j SIMPLE [(_t)_t.FieldSchema(name:_j, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x__._offsets EXPRESSION [(_t)_t.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE,
type:bigint, comment:), ]
+PREHOOK: query: drop table `_t`
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@_t
+PREHOOK: Output: default@_t
+POSTHOOK: query: drop table `_t`
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@_t
+POSTHOOK: Output: default@_t
+POSTHOOK: Lineage: default___t_x2__._bucketname SIMPLE [(_t)_t.FieldSchema(name:INPUT__FILE__NAME,
type:string, comment:), ]
+POSTHOOK: Lineage: default___t_x2__._i SIMPLE [(_t)_t.FieldSchema(name:_i, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x2__._j SIMPLE [(_t)_t.FieldSchema(name:_j, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x2__._offsets EXPRESSION [(_t)_t.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE,
type:bigint, comment:), ]
+POSTHOOK: Lineage: default___t_x__._bucketname SIMPLE [(_t)_t.FieldSchema(name:INPUT__FILE__NAME,
type:string, comment:), ]
+POSTHOOK: Lineage: default___t_x__._j SIMPLE [(_t)_t.FieldSchema(name:_j, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x__._offsets EXPRESSION [(_t)_t.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE,
type:bigint, comment:), ]
 PREHOOK: query: show tables
 PREHOOK: type: SHOWTABLES
 POSTHOOK: query: show tables
 POSTHOOK: type: SHOWTABLES
+POSTHOOK: Lineage: default___t_x2__._bucketname SIMPLE [(_t)_t.FieldSchema(name:INPUT__FILE__NAME,
type:string, comment:), ]
+POSTHOOK: Lineage: default___t_x2__._i SIMPLE [(_t)_t.FieldSchema(name:_i, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x2__._j SIMPLE [(_t)_t.FieldSchema(name:_j, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x2__._offsets EXPRESSION [(_t)_t.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE,
type:bigint, comment:), ]
+POSTHOOK: Lineage: default___t_x__._bucketname SIMPLE [(_t)_t.FieldSchema(name:INPUT__FILE__NAME,
type:string, comment:), ]
+POSTHOOK: Lineage: default___t_x__._j SIMPLE [(_t)_t.FieldSchema(name:_j, type:int, comment:null),
]
+POSTHOOK: Lineage: default___t_x__._offsets EXPRESSION [(_t)_t.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE,
type:bigint, comment:), ]
 src
 src1
 src_json



Mime
View raw message