PREHOOK: query: -- Test if index is actually being used. -- Create temp, and populate it with some values in src. CREATE TABLE temp(key STRING, val STRING) STORED AS TEXTFILE PREHOOK: type: CREATETABLE PREHOOK: Output: database:default PREHOOK: Output: default@temp POSTHOOK: query: -- Test if index is actually being used. -- Create temp, and populate it with some values in src. CREATE TABLE temp(key STRING, val STRING) STORED AS TEXTFILE POSTHOOK: type: CREATETABLE POSTHOOK: Output: database:default POSTHOOK: Output: default@temp PREHOOK: query: INSERT OVERWRITE TABLE temp SELECT * FROM src WHERE key < 50 PREHOOK: type: QUERY PREHOOK: Input: default@src PREHOOK: Output: default@temp POSTHOOK: query: INSERT OVERWRITE TABLE temp SELECT * FROM src WHERE key < 50 POSTHOOK: type: QUERY POSTHOOK: Input: default@src POSTHOOK: Output: default@temp POSTHOOK: Lineage: temp.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: temp.val SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] PREHOOK: query: -- Build an index on temp. CREATE INDEX temp_index ON TABLE temp(key) as 'COMPACT' WITH DEFERRED REBUILD PREHOOK: type: CREATEINDEX PREHOOK: Input: default@temp POSTHOOK: query: -- Build an index on temp. CREATE INDEX temp_index ON TABLE temp(key) as 'COMPACT' WITH DEFERRED REBUILD POSTHOOK: type: CREATEINDEX POSTHOOK: Input: default@temp POSTHOOK: Output: default@default__temp_temp_index__ PREHOOK: query: ALTER INDEX temp_index ON temp REBUILD PREHOOK: type: ALTERINDEX_REBUILD PREHOOK: Input: default@temp PREHOOK: Output: default@default__temp_temp_index__ POSTHOOK: query: ALTER INDEX temp_index ON temp REBUILD POSTHOOK: type: ALTERINDEX_REBUILD POSTHOOK: Input: default@temp POSTHOOK: Output: default@default__temp_temp_index__ POSTHOOK: Lineage: default__temp_temp_index__._bucketname SIMPLE [(temp)temp.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] POSTHOOK: Lineage: default__temp_temp_index__._offsets EXPRESSION [(temp)temp.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] POSTHOOK: Lineage: default__temp_temp_index__.key SIMPLE [(temp)temp.FieldSchema(name:key, type:string, comment:null), ] PREHOOK: query: -- overwrite temp table so index is out of date EXPLAIN INSERT OVERWRITE TABLE temp SELECT * FROM src PREHOOK: type: QUERY POSTHOOK: query: -- overwrite temp table so index is out of date EXPLAIN INSERT OVERWRITE TABLE temp SELECT * FROM src POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-6 is a root stage Stage-12 depends on stages: Stage-6 , consists of Stage-9, Stage-8, Stage-10 Stage-9 Stage-0 depends on stages: Stage-9, Stage-8, Stage-11 Stage-2 depends on stages: Stage-0 Stage-1 depends on stages: Stage-2 Stage-3 depends on stages: Stage-1 Stage-4 depends on stages: Stage-2 Stage-5 depends on stages: Stage-2 Stage-7 depends on stages: Stage-0 Stage-8 Stage-10 Stage-11 depends on stages: Stage-10 STAGE PLANS: Stage: Stage-6 Map Reduce Map Operator Tree: TableScan alias: src Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: default.temp Stage: Stage-12 Conditional Operator Stage: Stage-9 Move Operator files: hdfs directory: true #### A masked pattern was here #### Stage: Stage-0 Move Operator tables: replace: true table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: default.temp Stage: Stage-2 Map Reduce Map Operator Tree: TableScan alias: temp Select Operator expressions: key (type: string), INPUT__FILE__NAME (type: string), BLOCK__OFFSET__INSIDE__FILE (type: bigint) outputColumnNames: _col0, _col1, _col2 Group By Operator aggregations: collect_set(_col2) keys: _col0 (type: string), _col1 (type: string) mode: hash outputColumnNames: _col0, _col1, _col2 Reduce Output Operator key expressions: _col0 (type: string), _col1 (type: string) sort order: ++ Map-reduce partition columns: _col0 (type: string), _col1 (type: string) value expressions: _col2 (type: array) Reduce Operator Tree: Group By Operator aggregations: collect_set(VALUE._col0) keys: KEY._col0 (type: string), KEY._col1 (type: string) mode: mergepartial outputColumnNames: _col0, _col1, _col2 File Output Operator compressed: false table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: default.default__temp_temp_index__ Stage: Stage-1 Move Operator tables: replace: true table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: default.default__temp_temp_index__ Stage: Stage-3 Stats-Aggr Operator Stage: Stage-4 Stage: Stage-5 Stage: Stage-7 Stats-Aggr Operator Stage: Stage-8 Map Reduce Map Operator Tree: TableScan File Output Operator compressed: false table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: default.temp Stage: Stage-10 Map Reduce Map Operator Tree: TableScan File Output Operator compressed: false table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: default.temp Stage: Stage-11 Move Operator files: hdfs directory: true #### A masked pattern was here #### PREHOOK: query: INSERT OVERWRITE TABLE temp SELECT * FROM src PREHOOK: type: QUERY PREHOOK: Input: default@src PREHOOK: Input: default@temp PREHOOK: Output: default@temp POSTHOOK: query: INSERT OVERWRITE TABLE temp SELECT * FROM src POSTHOOK: type: QUERY POSTHOOK: Input: default@src POSTHOOK: Input: default@temp POSTHOOK: Output: default@temp POSTHOOK: Lineage: default__temp_temp_index__._bucketname SIMPLE [(temp)temp.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] POSTHOOK: Lineage: default__temp_temp_index__._offsets EXPRESSION [(temp)temp.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] POSTHOOK: Lineage: default__temp_temp_index__.key SIMPLE [(temp)temp.FieldSchema(name:key, type:string, comment:null), ] PREHOOK: query: -- query should return indexed values EXPLAIN SELECT * FROM temp WHERE key = 86 PREHOOK: type: QUERY POSTHOOK: query: -- query should return indexed values EXPLAIN SELECT * FROM temp WHERE key = 86 POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-3 is a root stage Stage-8 depends on stages: Stage-3 , consists of Stage-5, Stage-4, Stage-6 Stage-5 Stage-2 depends on stages: Stage-5, Stage-4, Stage-7 Stage-1 depends on stages: Stage-2 Stage-4 Stage-6 Stage-7 depends on stages: Stage-6 Stage-0 depends on stages: Stage-1 STAGE PLANS: Stage: Stage-3 Map Reduce Map Operator Tree: TableScan alias: default__temp_temp_index__ filterExpr: (UDFToDouble(key) = 86.0) (type: boolean) Filter Operator predicate: (UDFToDouble(key) = 86.0) (type: boolean) Select Operator expressions: _bucketname (type: string), _offsets (type: array) outputColumnNames: _col0, _col1 File Output Operator compressed: false table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe Stage: Stage-8 Conditional Operator Stage: Stage-5 Move Operator files: hdfs directory: true #### A masked pattern was here #### Stage: Stage-2 Move Operator files: hdfs directory: true #### A masked pattern was here #### Stage: Stage-1 Map Reduce Map Operator Tree: TableScan alias: temp filterExpr: (UDFToDouble(key) = 86.0) (type: boolean) Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: (UDFToDouble(key) = 86.0) (type: boolean) Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: '86' (type: string), val (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe Stage: Stage-4 Map Reduce Map Operator Tree: TableScan File Output Operator compressed: false table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe Stage: Stage-6 Map Reduce Map Operator Tree: TableScan File Output Operator compressed: false table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe Stage: Stage-7 Move Operator files: hdfs directory: true #### A masked pattern was here #### Stage: Stage-0 Fetch Operator limit: -1 Processor Tree: ListSink PREHOOK: query: SELECT * FROM temp WHERE key = 86 PREHOOK: type: QUERY PREHOOK: Input: default@default__temp_temp_index__ PREHOOK: Input: default@temp #### A masked pattern was here #### POSTHOOK: query: SELECT * FROM temp WHERE key = 86 POSTHOOK: type: QUERY POSTHOOK: Input: default@default__temp_temp_index__ POSTHOOK: Input: default@temp #### A masked pattern was here #### 86 val_86 PREHOOK: query: DROP table temp PREHOOK: type: DROPTABLE PREHOOK: Input: default@temp PREHOOK: Output: default@temp POSTHOOK: query: DROP table temp POSTHOOK: type: DROPTABLE POSTHOOK: Input: default@temp POSTHOOK: Output: default@temp