Saving all output to "!!{outputDirectory}!!/filter_join_breaktask.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/filter_join_breaktask.q >>> >>> CREATE TABLE filter_join_breaktask(key int, value string) partitioned by (ds string); No rows affected >>> >>> INSERT OVERWRITE TABLE filter_join_breaktask PARTITION(ds='2008-04-08') SELECT key, value from src1; '_col0','_col1' No rows selected >>> >>> >>> EXPLAIN EXTENDED SELECT f.key, g.value FROM filter_join_breaktask f JOIN filter_join_breaktask m ON( f.key = m.key AND f.ds='2008-04-08' AND m.ds='2008-04-08' AND f.key is not null) JOIN filter_join_breaktask g ON(g.value = m.value AND g.ds='2008-04-08' AND m.ds='2008-04-08' AND m.value is not null AND m.value !=''); 'Explain' 'ABSTRACT SYNTAX TREE:' ' (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_JOIN (TOK_TABREF (TOK_TABNAME filter_join_breaktask) f) (TOK_TABREF (TOK_TABNAME filter_join_breaktask) m) (AND (AND (AND (= (. (TOK_TABLE_OR_COL f) key) (. (TOK_TABLE_OR_COL m) key)) (= (. (TOK_TABLE_OR_COL f) ds) '2008-04-08')) (= (. (TOK_TABLE_OR_COL m) ds) '2008-04-08')) (TOK_FUNCTION TOK_ISNOTNULL (. (TOK_TABLE_OR_COL f) key)))) (TOK_TABREF (TOK_TABNAME filter_join_breaktask) g) (AND (AND (AND (AND (= (. (TOK_TABLE_OR_COL g) value) (. (TOK_TABLE_OR_COL m) value)) (= (. (TOK_TABLE_OR_COL g) ds) '2008-04-08')) (= (. (TOK_TABLE_OR_COL m) ds) '2008-04-08')) (TOK_FUNCTION TOK_ISNOTNULL (. (TOK_TABLE_OR_COL m) value))) (!= (. (TOK_TABLE_OR_COL m) value) '')))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL f) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL g) value)))))' '' 'STAGE DEPENDENCIES:' ' Stage-1 is a root stage' ' Stage-2 depends on stages: Stage-1' ' Stage-0 is a root stage' '' 'STAGE PLANS:' ' Stage: Stage-1' ' Map Reduce' ' Alias -> Map Operator Tree:' ' f ' ' TableScan' ' alias: f' ' GatherStats: false' ' Filter Operator' ' isSamplingPred: false' ' predicate:' ' expr: key is not null' ' type: boolean' ' Reduce Output Operator' ' key expressions:' ' expr: key' ' type: int' ' sort order: +' ' Map-reduce partition columns:' ' expr: key' ' type: int' ' tag: 0' ' value expressions:' ' expr: key' ' type: int' ' m ' ' TableScan' ' alias: m' ' GatherStats: false' ' Filter Operator' ' isSamplingPred: false' ' predicate:' ' expr: ((key is not null and value is not null) and (value <> ''))' ' type: boolean' ' Reduce Output Operator' ' key expressions:' ' expr: key' ' type: int' ' sort order: +' ' Map-reduce partition columns:' ' expr: key' ' type: int' ' tag: 1' ' value expressions:' ' expr: value' ' type: string' ' expr: ds' ' type: string' ' Needs Tagging: true' ' Path -> Alias:' ' !!{hive.metastore.warehouse.dir}!!/filter_join_breaktask.db/filter_join_breaktask/ds=2008-04-08 [f, m]' ' Path -> Partition:' ' !!{hive.metastore.warehouse.dir}!!/filter_join_breaktask.db/filter_join_breaktask/ds=2008-04-08 ' ' Partition' ' base file name: ds=2008-04-08' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' partition values:' ' ds 2008-04-08' ' properties:' ' bucket_count -1' ' columns key,value' ' columns.types int:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/filter_join_breaktask.db/filter_join_breaktask/ds=2008-04-08' ' name filter_join_breaktask.filter_join_breaktask' ' numFiles 1' ' numPartitions 1' ' numRows 25' ' partition_columns ds' ' rawDataSize 211' ' serialization.ddl struct filter_join_breaktask { i32 key, string value}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' totalSize 236' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' ' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value' ' columns.types int:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/filter_join_breaktask.db/filter_join_breaktask' ' name filter_join_breaktask.filter_join_breaktask' ' numFiles 1' ' numPartitions 1' ' numRows 25' ' partition_columns ds' ' rawDataSize 211' ' serialization.ddl struct filter_join_breaktask { i32 key, string value}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' totalSize 236' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: filter_join_breaktask.filter_join_breaktask' ' name: filter_join_breaktask.filter_join_breaktask' ' Reduce Operator Tree:' ' Join Operator' ' condition map:' ' Inner Join 0 to 1' ' condition expressions:' ' 0 {VALUE._col0}' ' 1 {VALUE._col1} {VALUE._col2}' ' handleSkewJoin: false' ' outputColumnNames: _col0, _col6, _col7' ' File Output Operator' ' compressed: false' ' GlobalTableId: 0' ' directory: file:!!{hive.exec.scratchdir}!!' ' NumFilesPerFileSink: 1' ' table:' ' input format: org.apache.hadoop.mapred.SequenceFileInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat' ' properties:' ' columns _col0,_col6,_col7' ' columns.types int,string,string' ' escape.delim \' ' TotalFiles: 1' ' GatherStats: false' ' MultiFileSpray: false' '' ' Stage: Stage-2' ' Map Reduce' ' Alias -> Map Operator Tree:' ' $INTNAME ' ' Reduce Output Operator' ' key expressions:' ' expr: _col6' ' type: string' ' sort order: +' ' Map-reduce partition columns:' ' expr: _col6' ' type: string' ' tag: 0' ' value expressions:' ' expr: _col0' ' type: int' ' g ' ' TableScan' ' alias: g' ' GatherStats: false' ' Filter Operator' ' isSamplingPred: false' ' predicate:' ' expr: (value <> '')' ' type: boolean' ' Reduce Output Operator' ' key expressions:' ' expr: value' ' type: string' ' sort order: +' ' Map-reduce partition columns:' ' expr: value' ' type: string' ' tag: 1' ' value expressions:' ' expr: value' ' type: string' ' Needs Tagging: true' ' Path -> Alias:' ' file:!!{hive.exec.scratchdir}!! [$INTNAME]' ' !!{hive.metastore.warehouse.dir}!!/filter_join_breaktask.db/filter_join_breaktask/ds=2008-04-08 [g]' ' Path -> Partition:' ' file:!!{hive.exec.scratchdir}!! ' ' Partition' ' base file name: -mr-10002' ' input format: org.apache.hadoop.mapred.SequenceFileInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat' ' properties:' ' columns _col0,_col6,_col7' ' columns.types int,string,string' ' escape.delim \' ' ' ' input format: org.apache.hadoop.mapred.SequenceFileInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat' ' properties:' ' columns _col0,_col6,_col7' ' columns.types int,string,string' ' escape.delim \' ' !!{hive.metastore.warehouse.dir}!!/filter_join_breaktask.db/filter_join_breaktask/ds=2008-04-08 ' ' Partition' ' base file name: ds=2008-04-08' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' partition values:' ' ds 2008-04-08' ' properties:' ' bucket_count -1' ' columns key,value' ' columns.types int:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/filter_join_breaktask.db/filter_join_breaktask/ds=2008-04-08' ' name filter_join_breaktask.filter_join_breaktask' ' numFiles 1' ' numPartitions 1' ' numRows 25' ' partition_columns ds' ' rawDataSize 211' ' serialization.ddl struct filter_join_breaktask { i32 key, string value}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' totalSize 236' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' ' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value' ' columns.types int:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/filter_join_breaktask.db/filter_join_breaktask' ' name filter_join_breaktask.filter_join_breaktask' ' numFiles 1' ' numPartitions 1' ' numRows 25' ' partition_columns ds' ' rawDataSize 211' ' serialization.ddl struct filter_join_breaktask { i32 key, string value}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' totalSize 236' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: filter_join_breaktask.filter_join_breaktask' ' name: filter_join_breaktask.filter_join_breaktask' ' Reduce Operator Tree:' ' Join Operator' ' condition map:' ' Inner Join 0 to 1' ' condition expressions:' ' 0 {VALUE._col0}' ' 1 {VALUE._col1}' ' handleSkewJoin: false' ' outputColumnNames: _col0, _col11' ' Select Operator' ' expressions:' ' expr: _col0' ' type: int' ' expr: _col11' ' type: string' ' outputColumnNames: _col0, _col1' ' File Output Operator' ' compressed: false' ' GlobalTableId: 0' ' directory: file:!!{hive.exec.scratchdir}!!' ' NumFilesPerFileSink: 1' ' Stats Publishing Key Prefix: file:!!{hive.exec.scratchdir}!!' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' columns _col0,_col1' ' columns.types int:string' ' escape.delim \' ' serialization.format 1' ' TotalFiles: 1' ' GatherStats: false' ' MultiFileSpray: false' '' ' Stage: Stage-0' ' Fetch Operator' ' limit: -1' '' '' 282 rows selected >>> >>> SELECT f.key, g.value FROM filter_join_breaktask f JOIN filter_join_breaktask m ON( f.key = m.key AND f.ds='2008-04-08' AND m.ds='2008-04-08' AND f.key is not null) JOIN filter_join_breaktask g ON(g.value = m.value AND g.ds='2008-04-08' AND m.ds='2008-04-08' AND m.value is not null AND m.value !=''); 'key','value' '146','val_146' '150','val_150' '213','val_213' '238','val_238' '255','val_255' '273','val_273' '278','val_278' '311','val_311' '401','val_401' '406','val_406' '66','val_66' '98','val_98' 12 rows selected >>> >>> !record