PREHOOK: query: EXPLAIN SELECT * FROM srcpart a JOIN srcpart b ON a.key = b.key WHERE a.ds = '2008-04-08' AND b.ds = '2008-04-08' AND CASE a.key WHEN '27' THEN TRUE WHEN '38' THEN FALSE ELSE NULL END ORDER BY a.key, a.value, a.ds, a.hr, b.key, b.value, b.ds, b.hr PREHOOK: type: QUERY POSTHOOK: query: EXPLAIN SELECT * FROM srcpart a JOIN srcpart b ON a.key = b.key WHERE a.ds = '2008-04-08' AND b.ds = '2008-04-08' AND CASE a.key WHEN '27' THEN TRUE WHEN '38' THEN FALSE ELSE NULL END ORDER BY a.key, a.value, a.ds, a.hr, b.key, b.value, b.ds, b.hr POSTHOOK: type: QUERY ABSTRACT SYNTAX TREE: (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF srcpart a) (TOK_TABREF srcpart b) (= (. (TOK_TABLE_OR_COL a) key) (. (TOK_TABLE_OR_COL b) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_WHERE (AND (AND (= (. (TOK_TABLE_OR_COL a) ds) '2008-04-08') (= (. (TOK_TABLE_OR_COL b) ds) '2008-04-08')) (TOK_FUNCTION CASE (. (TOK_TABLE_OR_COL a) key) '27' TRUE '38' FALSE TOK_NULL))) (TOK_ORDERBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL a) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL a) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL a) ds)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL a) hr)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL b) key)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL b) value)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL b) ds)) (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL b) hr))))) 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: a TableScan alias: a Filter Operator predicate: expr: ((ds = '2008-04-08') and CASE (key) WHEN ('27') THEN (true) WHEN ('38') THEN (false) ELSE (null) END) 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: key type: string expr: value type: string expr: ds type: string expr: hr type: string b TableScan alias: b Filter Operator predicate: expr: (ds = '2008-04-08') 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: key type: string expr: value type: string expr: ds type: string expr: hr type: string Reduce Operator Tree: Join Operator condition map: Inner Join 0 to 1 condition expressions: 0 {VALUE._col0} {VALUE._col1} {VALUE._col2} {VALUE._col3} 1 {VALUE._col0} {VALUE._col1} {VALUE._col2} {VALUE._col3} handleSkewJoin: false outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7 Filter Operator predicate: expr: (((_col2 = '2008-04-08') and (_col6 = '2008-04-08')) and CASE (_col0) WHEN ('27') THEN (true) WHEN ('38') THEN (false) ELSE (null) END) type: boolean Select Operator expressions: expr: _col0 type: string expr: _col1 type: string expr: _col2 type: string expr: _col3 type: string expr: _col4 type: string expr: _col5 type: string expr: _col6 type: string expr: _col7 type: string outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7 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:/data/users/zshao/hadoop_hive_trunk2/.ptest_2/build/ql/scratchdir/hive_2010-02-12_22-31-56_689_3254720341447490427/10002 Reduce Output Operator key expressions: expr: _col0 type: string expr: _col1 type: string expr: _col2 type: string expr: _col3 type: string expr: _col4 type: string expr: _col5 type: string expr: _col6 type: string expr: _col7 type: string sort order: ++++++++ tag: -1 value expressions: expr: _col0 type: string expr: _col1 type: string expr: _col2 type: string expr: _col3 type: string expr: _col4 type: string expr: _col5 type: string expr: _col6 type: string expr: _col7 type: string Reduce Operator Tree: Extract 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 PREHOOK: query: SELECT * FROM srcpart a JOIN srcpart b ON a.key = b.key WHERE a.ds = '2008-04-08' AND b.ds = '2008-04-08' AND CASE a.key WHEN '27' THEN TRUE WHEN '38' THEN FALSE ELSE NULL END ORDER BY a.key, a.value, a.ds, a.hr, b.key, b.value, b.ds, b.hr PREHOOK: type: QUERY PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 PREHOOK: Output: file:/data/users/zshao/hadoop_hive_trunk2/.ptest_2/build/ql/scratchdir/hive_2010-02-12_22-31-56_869_4629499201500113908/10000 POSTHOOK: query: SELECT * FROM srcpart a JOIN srcpart b ON a.key = b.key WHERE a.ds = '2008-04-08' AND b.ds = '2008-04-08' AND CASE a.key WHEN '27' THEN TRUE WHEN '38' THEN FALSE ELSE NULL END ORDER BY a.key, a.value, a.ds, a.hr, b.key, b.value, b.ds, b.hr POSTHOOK: type: QUERY POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 POSTHOOK: Output: file:/data/users/zshao/hadoop_hive_trunk2/.ptest_2/build/ql/scratchdir/hive_2010-02-12_22-31-56_869_4629499201500113908/10000 27 val_27 2008-04-08 11 27 val_27 2008-04-08 11 27 val_27 2008-04-08 11 27 val_27 2008-04-08 12 27 val_27 2008-04-08 12 27 val_27 2008-04-08 11 27 val_27 2008-04-08 12 27 val_27 2008-04-08 12