Saving all output to "!!{outputDirectory}!!/join27.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/join27.q >>> >>> >>> CREATE TABLE dest_j1(key INT, value STRING, val2 STRING) STORED AS TEXTFILE; No rows affected >>> >>> EXPLAIN INSERT OVERWRITE TABLE dest_j1 SELECT /*+ MAPJOIN(x) */ x.key, x.value, y.value FROM src1 x JOIN src y ON (x.value = y.value); 'Explain' 'ABSTRACT SYNTAX TREE:' ' (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME src1) x) (TOK_TABREF (TOK_TABNAME src) y) (= (. (TOK_TABLE_OR_COL x) value) (. (TOK_TABLE_OR_COL y) value)))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME dest_j1))) (TOK_SELECT (TOK_HINTLIST (TOK_HINT TOK_MAPJOIN (TOK_HINTARGLIST x))) (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL x) value)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL y) value)))))' '' 'STAGE DEPENDENCIES:' ' Stage-9 is a root stage' ' Stage-1 depends on stages: Stage-9' ' Stage-7 depends on stages: Stage-1 , consists of Stage-4, Stage-3, Stage-5' ' Stage-4' ' Stage-0 depends on stages: Stage-4, Stage-3, Stage-6' ' Stage-2 depends on stages: Stage-0' ' Stage-3' ' Stage-5' ' Stage-6 depends on stages: Stage-5' '' 'STAGE PLANS:' ' Stage: Stage-9' ' Map Reduce Local Work' ' Alias -> Map Local Tables:' ' x ' ' Fetch Operator' ' limit: -1' ' Alias -> Map Local Operator Tree:' ' x ' ' TableScan' ' alias: x' ' HashTable Sink Operator' ' condition expressions:' ' 0 {key} {value}' ' 1 {value}' ' handleSkewJoin: false' ' keys:' ' 0 [Column[value]]' ' 1 [Column[value]]' ' Position of Big Table: 1' '' ' Stage: Stage-1' ' Map Reduce' ' Alias -> Map Operator Tree:' ' y ' ' TableScan' ' alias: y' ' Map Join Operator' ' condition map:' ' Inner Join 0 to 1' ' condition expressions:' ' 0 {key} {value}' ' 1 {value}' ' handleSkewJoin: false' ' keys:' ' 0 [Column[value]]' ' 1 [Column[value]]' ' outputColumnNames: _col0, _col1, _col5' ' Position of Big Table: 1' ' Select Operator' ' expressions:' ' expr: _col0' ' type: string' ' expr: _col1' ' type: string' ' expr: _col5' ' type: string' ' outputColumnNames: _col0, _col1, _col5' ' Select Operator' ' expressions:' ' expr: _col0' ' type: string' ' expr: _col1' ' type: string' ' expr: _col5' ' type: string' ' outputColumnNames: _col0, _col1, _col2' ' Select Operator' ' expressions:' ' expr: UDFToInteger(_col0)' ' type: int' ' expr: _col1' ' type: string' ' expr: _col2' ' type: string' ' outputColumnNames: _col0, _col1, _col2' ' File Output Operator' ' compressed: false' ' GlobalTableId: 1' ' 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: join27.dest_j1' ' Local Work:' ' Map Reduce Local Work' '' ' Stage: Stage-7' ' Conditional Operator' '' ' Stage: Stage-4' ' Move Operator' ' files:' ' hdfs directory: true' ' destination: pfile:!!{hive.exec.scratchdir}!!' '' ' 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: join27.dest_j1' '' ' Stage: Stage-2' ' Stats-Aggr Operator' '' ' Stage: Stage-3' ' Map Reduce' ' Alias -> Map Operator Tree:' ' pfile:!!{hive.exec.scratchdir}!! ' ' File Output Operator' ' compressed: false' ' GlobalTableId: 0' ' 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: join27.dest_j1' '' ' Stage: Stage-5' ' Map Reduce' ' Alias -> Map Operator Tree:' ' pfile:!!{hive.exec.scratchdir}!! ' ' File Output Operator' ' compressed: false' ' GlobalTableId: 0' ' 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: join27.dest_j1' '' ' Stage: Stage-6' ' Move Operator' ' files:' ' hdfs directory: true' ' destination: pfile:!!{hive.exec.scratchdir}!!' '' '' 146 rows selected >>> >>> INSERT OVERWRITE TABLE dest_j1 SELECT /*+ MAPJOIN(x) */ x.key, x.value, y.value FROM src1 x JOIN src y ON (x.value = y.value); '_col0','_col1','_col2' No rows selected >>> >>> select * from dest_j1 x order by x.key, x.value; 'key','value','val2' '','val_165','val_165' '','val_165','val_165' '','val_193','val_193' '','val_193','val_193' '','val_193','val_193' '','val_265','val_265' '','val_265','val_265' '','val_27','val_27' '','val_409','val_409' '','val_409','val_409' '','val_409','val_409' '','val_484','val_484' '66','val_66','val_66' '98','val_98','val_98' '98','val_98','val_98' '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' '238','val_238','val_238' '238','val_238','val_238' '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' '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' '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' 41 rows selected >>> >>> >>> >>> !record