PREHOOK: query: -- test that stale indexes are not used CREATE TABLE temp(key STRING, val STRING) STORED AS TEXTFILE PREHOOK: type: CREATETABLE PREHOOK: Output: database:default PREHOOK: Output: default@temp POSTHOOK: query: -- test that stale indexes are not used 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 INSERT OVERWRITE TABLE temp SELECT * FROM src PREHOOK: type: QUERY PREHOOK: Input: default@src PREHOOK: Output: default@temp POSTHOOK: query: -- overwrite temp table so index is out of date INSERT OVERWRITE TABLE temp SELECT * FROM src 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: -- should return correct results bypassing index EXPLAIN SELECT * FROM temp WHERE key = 86 PREHOOK: type: QUERY POSTHOOK: query: -- should return correct results bypassing index EXPLAIN SELECT * FROM temp WHERE key = 86 POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 STAGE PLANS: 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-0 Fetch Operator limit: -1 Processor Tree: ListSink PREHOOK: query: SELECT * FROM temp WHERE key = 86 PREHOOK: type: QUERY PREHOOK: Input: default@temp #### A masked pattern was here #### POSTHOOK: query: SELECT * FROM temp WHERE key = 86 POSTHOOK: type: QUERY 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