PREHOOK: query: create table hive_foo (foo_id int, foo_name string, foo_a string, foo_b string, foo_c string, foo_d string) row format delimited fields terminated by ',' stored as textfile PREHOOK: type: CREATETABLE POSTHOOK: query: create table hive_foo (foo_id int, foo_name string, foo_a string, foo_b string, foo_c string, foo_d string) row format delimited fields terminated by ',' stored as textfile POSTHOOK: type: CREATETABLE POSTHOOK: Output: default@hive_foo PREHOOK: query: create table hive_bar (bar_id int, bar_0 int, foo_id int, bar_1 int, bar_name string, bar_a string, bar_b string, bar_c string, bar_d string) row format delimited fields terminated by ',' stored as textfile PREHOOK: type: CREATETABLE POSTHOOK: query: create table hive_bar (bar_id int, bar_0 int, foo_id int, bar_1 int, bar_name string, bar_a string, bar_b string, bar_c string, bar_d string) row format delimited fields terminated by ',' stored as textfile POSTHOOK: type: CREATETABLE POSTHOOK: Output: default@hive_bar PREHOOK: query: create table hive_count (bar_id int, n int) row format delimited fields terminated by ',' stored as textfile PREHOOK: type: CREATETABLE POSTHOOK: query: create table hive_count (bar_id int, n int) row format delimited fields terminated by ',' stored as textfile POSTHOOK: type: CREATETABLE POSTHOOK: Output: default@hive_count PREHOOK: query: load data local inpath '../data/files/hive_626_foo.txt' overwrite into table hive_foo PREHOOK: type: LOAD PREHOOK: Output: default@hive_foo POSTHOOK: query: load data local inpath '../data/files/hive_626_foo.txt' overwrite into table hive_foo POSTHOOK: type: LOAD POSTHOOK: Output: default@hive_foo PREHOOK: query: load data local inpath '../data/files/hive_626_bar.txt' overwrite into table hive_bar PREHOOK: type: LOAD PREHOOK: Output: default@hive_bar POSTHOOK: query: load data local inpath '../data/files/hive_626_bar.txt' overwrite into table hive_bar POSTHOOK: type: LOAD POSTHOOK: Output: default@hive_bar PREHOOK: query: load data local inpath '../data/files/hive_626_count.txt' overwrite into table hive_count PREHOOK: type: LOAD PREHOOK: Output: default@hive_count POSTHOOK: query: load data local inpath '../data/files/hive_626_count.txt' overwrite into table hive_count POSTHOOK: type: LOAD POSTHOOK: Output: default@hive_count PREHOOK: query: explain select hive_foo.foo_name, hive_bar.bar_name, n from hive_foo join hive_bar on hive_foo.foo_id = hive_bar.foo_id join hive_count on hive_count.bar_id = hive_bar.bar_id PREHOOK: type: QUERY POSTHOOK: query: explain select hive_foo.foo_name, hive_bar.bar_name, n from hive_foo join hive_bar on hive_foo.foo_id = hive_bar.foo_id join hive_count on hive_count.bar_id = hive_bar.bar_id POSTHOOK: type: QUERY ABSTRACT SYNTAX TREE: (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_JOIN (TOK_TABREF (TOK_TABNAME hive_foo)) (TOK_TABREF (TOK_TABNAME hive_bar)) (= (. (TOK_TABLE_OR_COL hive_foo) foo_id) (. (TOK_TABLE_OR_COL hive_bar) foo_id))) (TOK_TABREF (TOK_TABNAME hive_count)) (= (. (TOK_TABLE_OR_COL hive_count) bar_id) (. (TOK_TABLE_OR_COL hive_bar) bar_id)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL hive_foo) foo_name)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL hive_bar) bar_name)) (TOK_SELEXPR (TOK_TABLE_OR_COL n))))) 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: hive_bar TableScan alias: hive_bar Reduce Output Operator key expressions: expr: foo_id type: int sort order: + Map-reduce partition columns: expr: foo_id type: int tag: 1 value expressions: expr: bar_id type: int expr: bar_name type: string hive_foo TableScan alias: hive_foo Reduce Output Operator key expressions: expr: foo_id type: int sort order: + Map-reduce partition columns: expr: foo_id type: int tag: 0 value expressions: expr: foo_name type: string Reduce Operator Tree: Join Operator condition map: Inner Join 0 to 1 condition expressions: 0 {VALUE._col1} 1 {VALUE._col0} {VALUE._col4} handleSkewJoin: false outputColumnNames: _col1, _col8, _col12 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: $INTNAME Reduce Output Operator key expressions: expr: _col8 type: int sort order: + Map-reduce partition columns: expr: _col8 type: int tag: 0 value expressions: expr: _col1 type: string expr: _col12 type: string hive_count TableScan alias: hive_count Reduce Output Operator key expressions: expr: bar_id type: int sort order: + Map-reduce partition columns: expr: bar_id type: int tag: 1 value expressions: expr: n type: int Reduce Operator Tree: Join Operator condition map: Inner Join 0 to 1 condition expressions: 0 {VALUE._col1} {VALUE._col12} 1 {VALUE._col1} handleSkewJoin: false outputColumnNames: _col1, _col12, _col20 Select Operator expressions: expr: _col1 type: string expr: _col12 type: string expr: _col20 type: int outputColumnNames: _col0, _col1, _col2 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 hive_foo.foo_name, hive_bar.bar_name, n from hive_foo join hive_bar on hive_foo.foo_id = hive_bar.foo_id join hive_count on hive_count.bar_id = hive_bar.bar_id PREHOOK: type: QUERY PREHOOK: Input: default@hive_bar PREHOOK: Input: default@hive_count PREHOOK: Input: default@hive_foo PREHOOK: Output: file:/tmp/krishnak/hive_2011-03-21_03-52-56_553_3455781225434177776/-mr-10000 POSTHOOK: query: select hive_foo.foo_name, hive_bar.bar_name, n from hive_foo join hive_bar on hive_foo.foo_id = hive_bar.foo_id join hive_count on hive_count.bar_id = hive_bar.bar_id POSTHOOK: type: QUERY POSTHOOK: Input: default@hive_bar POSTHOOK: Input: default@hive_count POSTHOOK: Input: default@hive_foo POSTHOOK: Output: file:/tmp/krishnak/hive_2011-03-21_03-52-56_553_3455781225434177776/-mr-10000 foo1 bar10 2