PREHOOK: query: -- SORT_QUERY_RESULTS -- Want to ensure we can build and use indices on tables stored with SerDes -- Build the (Avro backed) table CREATE TABLE doctors ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe' STORED AS INPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat' TBLPROPERTIES ('avro.schema.literal'='{ "namespace": "testing.hive.avro.serde", "name": "doctors", "type": "record", "fields": [ { "name":"number", "type":"int", "doc":"Order of playing the role" }, { "name":"first_name", "type":"string", "doc":"first name of actor playing role" }, { "name":"last_name", "type":"string", "doc":"last name of actor playing role" } ] }') PREHOOK: type: CREATETABLE PREHOOK: Output: database:default PREHOOK: Output: default@doctors POSTHOOK: query: -- SORT_QUERY_RESULTS -- Want to ensure we can build and use indices on tables stored with SerDes -- Build the (Avro backed) table CREATE TABLE doctors ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe' STORED AS INPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat' TBLPROPERTIES ('avro.schema.literal'='{ "namespace": "testing.hive.avro.serde", "name": "doctors", "type": "record", "fields": [ { "name":"number", "type":"int", "doc":"Order of playing the role" }, { "name":"first_name", "type":"string", "doc":"first name of actor playing role" }, { "name":"last_name", "type":"string", "doc":"last name of actor playing role" } ] }') POSTHOOK: type: CREATETABLE POSTHOOK: Output: database:default POSTHOOK: Output: default@doctors PREHOOK: query: DESCRIBE doctors PREHOOK: type: DESCTABLE PREHOOK: Input: default@doctors POSTHOOK: query: DESCRIBE doctors POSTHOOK: type: DESCTABLE POSTHOOK: Input: default@doctors number int Order of playing the role first_name string first name of actor playing role last_name string last name of actor playing role PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/doctors.avro' INTO TABLE doctors PREHOOK: type: LOAD #### A masked pattern was here #### PREHOOK: Output: default@doctors POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/doctors.avro' INTO TABLE doctors POSTHOOK: type: LOAD #### A masked pattern was here #### POSTHOOK: Output: default@doctors PREHOOK: query: -- Create and build an index CREATE INDEX doctors_index ON TABLE doctors(number) AS 'COMPACT' WITH DEFERRED REBUILD PREHOOK: type: CREATEINDEX PREHOOK: Input: default@doctors POSTHOOK: query: -- Create and build an index CREATE INDEX doctors_index ON TABLE doctors(number) AS 'COMPACT' WITH DEFERRED REBUILD POSTHOOK: type: CREATEINDEX POSTHOOK: Input: default@doctors POSTHOOK: Output: default@default__doctors_doctors_index__ PREHOOK: query: DESCRIBE EXTENDED default__doctors_doctors_index__ PREHOOK: type: DESCTABLE PREHOOK: Input: default@default__doctors_doctors_index__ POSTHOOK: query: DESCRIBE EXTENDED default__doctors_doctors_index__ POSTHOOK: type: DESCTABLE POSTHOOK: Input: default@default__doctors_doctors_index__ number int Order of playing the role _bucketname string _offsets array #### A masked pattern was here #### PREHOOK: query: ALTER INDEX doctors_index ON doctors REBUILD PREHOOK: type: ALTERINDEX_REBUILD PREHOOK: Input: default@doctors PREHOOK: Output: default@default__doctors_doctors_index__ POSTHOOK: query: ALTER INDEX doctors_index ON doctors REBUILD POSTHOOK: type: ALTERINDEX_REBUILD POSTHOOK: Input: default@doctors POSTHOOK: Output: default@default__doctors_doctors_index__ POSTHOOK: Lineage: default__doctors_doctors_index__._bucketname SIMPLE [(doctors)doctors.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] POSTHOOK: Lineage: default__doctors_doctors_index__._offsets EXPRESSION [(doctors)doctors.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] POSTHOOK: Lineage: default__doctors_doctors_index__.number SIMPLE [(doctors)doctors.FieldSchema(name:number, type:int, comment:Order of playing the role), ] PREHOOK: query: EXPLAIN SELECT * FROM doctors WHERE number > 6 PREHOOK: type: QUERY POSTHOOK: query: EXPLAIN SELECT * FROM doctors WHERE number > 6 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__doctors_doctors_index__ filterExpr: (number > 6) (type: boolean) Filter Operator predicate: (number > 6) (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: doctors filterExpr: (number > 6) (type: boolean) Statistics: Num rows: 2 Data size: 521 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: (number > 6) (type: boolean) Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE Select Operator expressions: number (type: int), first_name (type: string), last_name (type: string) outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE File Output Operator compressed: false Statistics: Num rows: 0 Data size: 0 Basic stats: NONE 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 doctors WHERE number > 6 PREHOOK: type: QUERY PREHOOK: Input: default@default__doctors_doctors_index__ PREHOOK: Input: default@doctors #### A masked pattern was here #### POSTHOOK: query: SELECT * FROM doctors WHERE number > 6 POSTHOOK: type: QUERY POSTHOOK: Input: default@default__doctors_doctors_index__ POSTHOOK: Input: default@doctors #### A masked pattern was here #### 10 David Tennant 11 Matt Smith 7 Sylvester McCoy 8 Paul McGann 9 Christopher Eccleston PREHOOK: query: DROP INDEX doctors_index ON doctors PREHOOK: type: DROPINDEX PREHOOK: Input: default@doctors POSTHOOK: query: DROP INDEX doctors_index ON doctors POSTHOOK: type: DROPINDEX POSTHOOK: Input: default@doctors PREHOOK: query: DROP TABLE doctors PREHOOK: type: DROPTABLE PREHOOK: Input: default@doctors PREHOOK: Output: default@doctors POSTHOOK: query: DROP TABLE doctors POSTHOOK: type: DROPTABLE POSTHOOK: Input: default@doctors POSTHOOK: Output: default@doctors