query: CREATE TABLE dest_j1(key STRING, value STRING, val2 STRING) STORED AS TEXTFILE query: EXPLAIN EXTENDED INSERT OVERWRITE TABLE dest_j1 SELECT /*+ MAPJOIN(x,z) */ x.key, z.value, y.value FROM src1 x JOIN src y ON (x.key = y.key) JOIN srcpart z ON (x.value = z.value and z.ds='2008-04-08' and z.hr=11) ABSTRACT SYNTAX TREE: (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_JOIN (TOK_TABREF src1 x) (TOK_TABREF src y) (= (. (TOK_TABLE_OR_COL x) key) (. (TOK_TABLE_OR_COL y) key))) (TOK_TABREF srcpart z) (and (and (= (. (TOK_TABLE_OR_COL x) value) (. (TOK_TABLE_OR_COL z) value)) (= (. (TOK_TABLE_OR_COL z) ds) '2008-04-08')) (= (. (TOK_TABLE_OR_COL z) hr) 11)))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB dest_j1)) (TOK_SELECT (TOK_HINTLIST (TOK_HINT TOK_MAPJOIN (TOK_HINTARGLIST x z))) (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL z) value)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL y) value))))) STAGE DEPENDENCIES: Stage-5 is a root stage Stage-1 depends on stages: Stage-5 Stage-4 depends on stages: Stage-1 Stage-0 depends on stages: Stage-4 STAGE PLANS: Stage: Stage-5 Map Reduce Alias -> Map Operator Tree: y TableScan alias: y Common Join Operator condition map: Inner Join 0 to 1 condition expressions: 0 {key} {value} 1 {value} keys: 0 1 outputColumnNames: _col0, _col1, _col3 Position of Big Table: 1 File Output Operator compressed: false GlobalTableId: 0 directory: file:/data/users/athusoo/commits/hive_trunk_ws1/build/ql/tmp/919843627/10003 table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat properties: columns _col0,_col1,_col3 columns.types string,string,string escape.delim \ Local Work: Map Reduce Local Work Alias -> Map Local Tables: x Fetch Operator limit: -1 Alias -> Map Local Operator Tree: x TableScan alias: x Common Join Operator condition map: Inner Join 0 to 1 condition expressions: 0 {key} {value} 1 {value} keys: 0 1 outputColumnNames: _col0, _col1, _col3 Position of Big Table: 1 File Output Operator compressed: false GlobalTableId: 0 directory: file:/data/users/athusoo/commits/hive_trunk_ws1/build/ql/tmp/919843627/10003 table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat properties: columns _col0,_col1,_col3 columns.types string,string,string escape.delim \ Needs Tagging: false Path -> Alias: file:/data/users/athusoo/commits/hive_trunk_ws1/build/ql/test/data/warehouse/src Path -> Partition: file:/data/users/athusoo/commits/hive_trunk_ws1/build/ql/test/data/warehouse/src Partition input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat properties: name src columns.types string:string serialization.ddl struct src { string key, string value} serialization.format 1 columns key,value bucket_count -1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat location file:/data/users/athusoo/commits/hive_trunk_ws1/build/ql/test/data/warehouse/src serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: src Stage: Stage-1 Map Reduce Alias -> Map Operator Tree: file:/data/users/athusoo/commits/hive_trunk_ws1/build/ql/tmp/919843627/10003 Select Operator expressions: expr: _col0 type: string expr: _col1 type: string expr: _col3 type: string outputColumnNames: _col0, _col1, _col3 Common Join Operator condition map: Inner Join 0 to 1 condition expressions: 0 {_col3} {_col0} 1 {value} keys: 0 1 outputColumnNames: _col1, _col2, _col5 Position of Big Table: 0 Select Operator expressions: expr: _col1 type: string expr: _col2 type: string expr: _col5 type: string outputColumnNames: _col1, _col2, _col5 Select Operator expressions: expr: _col2 type: string expr: _col5 type: string expr: _col1 type: string outputColumnNames: _col0, _col1, _col2 File Output Operator compressed: false GlobalTableId: 1 directory: file:/data/users/athusoo/commits/hive_trunk_ws1/build/ql/tmp/919843627/10002 table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat properties: name dest_j1 columns.types string:string:string serialization.ddl struct dest_j1 { string key, string value, string val2} serialization.format 1 columns key,value,val2 bucket_count -1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat location file:/data/users/athusoo/commits/hive_trunk_ws1/build/ql/test/data/warehouse/dest_j1 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: dest_j1 Local Work: Map Reduce Local Work Alias -> Map Local Tables: z Fetch Operator limit: -1 Alias -> Map Local Operator Tree: z TableScan alias: z Filter Operator isSamplingPred: false predicate: expr: ((ds = '2008-04-08') and (UDFToDouble(hr) = UDFToDouble(11))) type: boolean Filter Operator isSamplingPred: false predicate: expr: (ds = '2008-04-08') type: boolean Filter Operator isSamplingPred: false predicate: expr: (UDFToDouble(hr) = UDFToDouble(11)) type: boolean Common Join Operator condition map: Inner Join 0 to 1 condition expressions: 0 {_col3} {_col0} 1 {value} keys: 0 1 outputColumnNames: _col1, _col2, _col5 Position of Big Table: 0 Select Operator expressions: expr: _col1 type: string expr: _col2 type: string expr: _col5 type: string outputColumnNames: _col1, _col2, _col5 Select Operator expressions: expr: _col2 type: string expr: _col5 type: string expr: _col1 type: string outputColumnNames: _col0, _col1, _col2 File Output Operator compressed: false GlobalTableId: 1 directory: file:/data/users/athusoo/commits/hive_trunk_ws1/build/ql/tmp/919843627/10002 table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat properties: name dest_j1 columns.types string:string:string serialization.ddl struct dest_j1 { string key, string value, string val2} serialization.format 1 columns key,value,val2 bucket_count -1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat location file:/data/users/athusoo/commits/hive_trunk_ws1/build/ql/test/data/warehouse/dest_j1 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: dest_j1 Needs Tagging: false Path -> Alias: file:/data/users/athusoo/commits/hive_trunk_ws1/build/ql/tmp/919843627/10003 Path -> Partition: file:/data/users/athusoo/commits/hive_trunk_ws1/build/ql/tmp/919843627/10003 Partition input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat properties: columns _col0,_col1,_col3 columns.types string,string,string escape.delim \ Stage: Stage-4 Conditional Operator list of dependent Tasks: Move Operator files: hdfs directory: true source: file:/data/users/athusoo/commits/hive_trunk_ws1/build/ql/tmp/919843627/10002 destination: file:/data/users/athusoo/commits/hive_trunk_ws1/build/ql/tmp/448925002/10000 Map Reduce Alias -> Map Operator Tree: file:/data/users/athusoo/commits/hive_trunk_ws1/build/ql/tmp/919843627/10002 Reduce Output Operator sort order: Map-reduce partition columns: expr: rand() type: double tag: -1 value expressions: expr: key type: string expr: value type: string expr: val2 type: string Needs Tagging: false Path -> Alias: file:/data/users/athusoo/commits/hive_trunk_ws1/build/ql/tmp/919843627/10002 Path -> Partition: file:/data/users/athusoo/commits/hive_trunk_ws1/build/ql/tmp/919843627/10002 Partition input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat properties: name dest_j1 columns.types string:string:string serialization.ddl struct dest_j1 { string key, string value, string val2} serialization.format 1 columns key,value,val2 bucket_count -1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat location file:/data/users/athusoo/commits/hive_trunk_ws1/build/ql/test/data/warehouse/dest_j1 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: dest_j1 Reduce Operator Tree: Extract File Output Operator compressed: false GlobalTableId: 0 directory: file:/data/users/athusoo/commits/hive_trunk_ws1/build/ql/tmp/448925002/10000 table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat properties: name dest_j1 columns.types string:string:string serialization.ddl struct dest_j1 { string key, string value, string val2} serialization.format 1 columns key,value,val2 bucket_count -1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe file.inputformat org.apache.hadoop.mapred.TextInputFormat location file:/data/users/athusoo/commits/hive_trunk_ws1/build/ql/test/data/warehouse/dest_j1 file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: dest_j1 Stage: Stage-0 Move Operator tables: replace: true source: file:/data/users/athusoo/commits/hive_trunk_ws1/build/ql/tmp/448925002/10000 table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat properties: name dest_j1 columns.types string:string:string serialization.ddl struct dest_j1 { string key, string value, string val2} serialization.format 1 columns key,value,val2 bucket_count -1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat location file:/data/users/athusoo/commits/hive_trunk_ws1/build/ql/test/data/warehouse/dest_j1 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: dest_j1 tmp directory: file:/data/users/athusoo/commits/hive_trunk_ws1/build/ql/tmp/448925002/10001 query: INSERT OVERWRITE TABLE dest_j1 SELECT /*+ MAPJOIN(x,z) */ x.key, z.value, y.value FROM src1 x JOIN src y ON (x.key = y.key) JOIN srcpart z ON (x.value = z.value and z.ds='2008-04-08' and z.hr=11) Input: default/srcpart/ds=2008-04-08/hr=11 Input: default/src Input: default/src1 Output: default/dest_j1 query: select * from dest_j1 x order by x.key Input: default/dest_j1 Output: file:/data/users/athusoo/commits/hive_trunk_ws1/build/ql/tmp/1275139268/10000 146 val_146 val_146 146 val_146 val_146 146 val_146 val_146 146 val_146 val_146 150 val_150 val_150 213 val_213 val_213 213 val_213 val_213 213 val_213 val_213 213 val_213 val_213 238 val_238 val_238 238 val_238 val_238 238 val_238 val_238 238 val_238 val_238 255 val_255 val_255 255 val_255 val_255 255 val_255 val_255 255 val_255 val_255 273 val_273 val_273 273 val_273 val_273 273 val_273 val_273 273 val_273 val_273 273 val_273 val_273 273 val_273 val_273 273 val_273 val_273 273 val_273 val_273 273 val_273 val_273 278 val_278 val_278 278 val_278 val_278 278 val_278 val_278 278 val_278 val_278 311 val_311 val_311 311 val_311 val_311 311 val_311 val_311 311 val_311 val_311 311 val_311 val_311 311 val_311 val_311 311 val_311 val_311 311 val_311 val_311 311 val_311 val_311 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 401 val_401 val_401 406 val_406 val_406 406 val_406 val_406 406 val_406 val_406 406 val_406 val_406 406 val_406 val_406 406 val_406 val_406 406 val_406 val_406 406 val_406 val_406 406 val_406 val_406 406 val_406 val_406 406 val_406 val_406 406 val_406 val_406 406 val_406 val_406 406 val_406 val_406 406 val_406 val_406 406 val_406 val_406 66 val_66 val_66 98 val_98 val_98 98 val_98 val_98 98 val_98 val_98 98 val_98 val_98 query: drop table dest_j1