Saving all output to "!!{outputDirectory}!!/input39.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/input39.q >>> >>> >>> >>> create table t1(key string, value string) partitioned by (ds string); No rows affected >>> create table t2(key string, value string) partitioned by (ds string); No rows affected >>> >>> insert overwrite table t1 partition (ds='1') select key, value from src; 'key','value' No rows selected >>> >>> insert overwrite table t1 partition (ds='2') select key, value from src; 'key','value' No rows selected >>> >>> insert overwrite table t2 partition (ds='1') select key, value from src; 'key','value' No rows selected >>> >>> set hive.test.mode=true; No rows affected >>> set hive.mapred.mode=strict; No rows affected >>> set mapred.job.tracker=does.notexist.com:666; No rows affected >>> set hive.exec.mode.local.auto=true; No rows affected >>> >>> explain select count(1) from t1 join t2 on t1.key=t2.key where t1.ds='1' and t2.ds='1'; 'Explain' 'ABSTRACT SYNTAX TREE:' ' (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF (TOK_TABNAME t1)) (TOK_TABREF (TOK_TABNAME t2)) (= (. (TOK_TABLE_OR_COL t1) key) (. (TOK_TABLE_OR_COL t2) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION count 1))) (TOK_WHERE (and (= (. (TOK_TABLE_OR_COL t1) ds) '1') (= (. (TOK_TABLE_OR_COL t2) ds) '1')))))' '' '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:' ' t1 ' ' TableScan' ' alias: t1' ' Filter Operator' ' predicate:' ' expr: (((hash(rand(460476415)) & 2147483647) % 32) = 0)' ' type: boolean' ' Reduce Output Operator' ' key expressions:' ' expr: key' ' type: string' ' sort order: +' ' Map-reduce partition columns:' ' expr: key' ' type: string' ' tag: 0' ' value expressions:' ' expr: ds' ' type: string' ' t2 ' ' TableScan' ' alias: t2' ' Filter Operator' ' predicate:' ' expr: (((hash(rand(460476415)) & 2147483647) % 32) = 0)' ' type: boolean' ' Reduce Output Operator' ' key expressions:' ' expr: key' ' type: string' ' sort order: +' ' Map-reduce partition columns:' ' expr: key' ' type: string' ' tag: 1' ' value expressions:' ' expr: ds' ' type: string' ' Reduce Operator Tree:' ' Join Operator' ' condition map:' ' Inner Join 0 to 1' ' condition expressions:' ' 0 {VALUE._col2}' ' 1 {VALUE._col2}' ' handleSkewJoin: false' ' outputColumnNames: _col2, _col7' ' Select Operator' ' Group By Operator' ' aggregations:' ' expr: count(1)' ' bucketGroup: false' ' mode: hash' ' outputColumnNames: _col0' ' File Output Operator' ' compressed: false' ' GlobalTableId: 0' ' table:' ' input format: org.apache.hadoop.mapred.SequenceFileInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat' '' ' Stage: Stage-2' ' Map Reduce' ' Alias -> Map Operator Tree:' ' file:!!{hive.exec.scratchdir}!! ' ' Reduce Output Operator' ' sort order: ' ' tag: -1' ' value expressions:' ' expr: _col0' ' type: bigint' ' Reduce Operator Tree:' ' Group By Operator' ' aggregations:' ' expr: count(VALUE._col0)' ' bucketGroup: false' ' mode: mergepartial' ' outputColumnNames: _col0' ' Select Operator' ' expressions:' ' expr: _col0' ' type: bigint' ' outputColumnNames: _col0' ' File Output Operator' ' compressed: false' ' GlobalTableId: 0' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' '' ' Stage: Stage-0' ' Fetch Operator' ' limit: -1' '' '' 107 rows selected >>> >>> select count(1) from t1 join t2 on t1.key=t2.key where t1.ds='1' and t2.ds='1'; '_c0' '18' 1 row selected >>> >>> set hive.test.mode=false; No rows affected >>> set mapred.job.tracker; 'set' 'mapred.job.tracker=does.notexist.com:666' 1 row selected >>> >>> >>> >>> !record