Saving all output to "!!{outputDirectory}!!/ppd_outer_join5.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/ppd_outer_join5.q >>> set hive.optimize.ppd=true; No rows affected >>> set hive.ppd.remove.duplicatefilters=true; No rows affected >>> >>> create table t1 (id int, key string, value string); No rows affected >>> create table t2 (id int, key string, value string); No rows affected >>> create table t3 (id int, key string, value string); No rows affected >>> create table t4 (id int, key string, value string); No rows affected >>> >>> explain select * from t1 full outer join t2 on t1.id=t2.id join t3 on t2.id=t3.id where t3.id=20; 'Explain' 'ABSTRACT SYNTAX TREE:' ' (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_FULLOUTERJOIN (TOK_TABREF (TOK_TABNAME t1)) (TOK_TABREF (TOK_TABNAME t2)) (= (. (TOK_TABLE_OR_COL t1) id) (. (TOK_TABLE_OR_COL t2) id))) (TOK_TABREF (TOK_TABNAME t3)) (= (. (TOK_TABLE_OR_COL t2) id) (. (TOK_TABLE_OR_COL t3) id)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_WHERE (= (. (TOK_TABLE_OR_COL t3) id) 20))))' '' 'STAGE DEPENDENCIES:' ' Stage-1 is a root stage' ' 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: (id = 20)' ' type: boolean' ' Reduce Output Operator' ' key expressions:' ' expr: id' ' type: int' ' sort order: +' ' Map-reduce partition columns:' ' expr: id' ' type: int' ' tag: 0' ' value expressions:' ' expr: id' ' type: int' ' expr: key' ' type: string' ' expr: value' ' type: string' ' t2 ' ' TableScan' ' alias: t2' ' Filter Operator' ' predicate:' ' expr: (id = 20)' ' type: boolean' ' Reduce Output Operator' ' key expressions:' ' expr: id' ' type: int' ' sort order: +' ' Map-reduce partition columns:' ' expr: id' ' type: int' ' tag: 1' ' value expressions:' ' expr: id' ' type: int' ' expr: key' ' type: string' ' expr: value' ' type: string' ' t3 ' ' TableScan' ' alias: t3' ' Filter Operator' ' predicate:' ' expr: (id = 20)' ' type: boolean' ' Reduce Output Operator' ' key expressions:' ' expr: id' ' type: int' ' sort order: +' ' Map-reduce partition columns:' ' expr: id' ' type: int' ' tag: 2' ' value expressions:' ' expr: id' ' type: int' ' expr: key' ' type: string' ' expr: value' ' type: string' ' Reduce Operator Tree:' ' Join Operator' ' condition map:' ' Outer Join 0 to 1' ' Inner Join 1 to 2' ' condition expressions:' ' 0 {VALUE._col0} {VALUE._col1} {VALUE._col2}' ' 1 {VALUE._col0} {VALUE._col1} {VALUE._col2}' ' 2 {VALUE._col0} {VALUE._col1} {VALUE._col2}' ' handleSkewJoin: false' ' outputColumnNames: _col0, _col1, _col2, _col5, _col6, _col7, _col10, _col11, _col12' ' Select Operator' ' expressions:' ' expr: _col0' ' type: int' ' expr: _col1' ' type: string' ' expr: _col2' ' type: string' ' expr: _col5' ' type: int' ' expr: _col6' ' type: string' ' expr: _col7' ' type: string' ' expr: _col10' ' type: int' ' expr: _col11' ' type: string' ' expr: _col12' ' type: string' ' outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8' ' 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' '' '' 124 rows selected >>> explain select * from t1 join t2 on (t1.id=t2.id) left outer join t3 on (t2.id=t3.id) where t2.id=20; 'Explain' 'ABSTRACT SYNTAX TREE:' ' (TOK_QUERY (TOK_FROM (TOK_LEFTOUTERJOIN (TOK_JOIN (TOK_TABREF (TOK_TABNAME t1)) (TOK_TABREF (TOK_TABNAME t2)) (= (. (TOK_TABLE_OR_COL t1) id) (. (TOK_TABLE_OR_COL t2) id))) (TOK_TABREF (TOK_TABNAME t3)) (= (. (TOK_TABLE_OR_COL t2) id) (. (TOK_TABLE_OR_COL t3) id)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_WHERE (= (. (TOK_TABLE_OR_COL t2) id) 20))))' '' 'STAGE DEPENDENCIES:' ' Stage-1 is a root stage' ' 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: (id = 20)' ' type: boolean' ' Reduce Output Operator' ' key expressions:' ' expr: id' ' type: int' ' sort order: +' ' Map-reduce partition columns:' ' expr: id' ' type: int' ' tag: 0' ' value expressions:' ' expr: id' ' type: int' ' expr: key' ' type: string' ' expr: value' ' type: string' ' t2 ' ' TableScan' ' alias: t2' ' Filter Operator' ' predicate:' ' expr: (id = 20)' ' type: boolean' ' Reduce Output Operator' ' key expressions:' ' expr: id' ' type: int' ' sort order: +' ' Map-reduce partition columns:' ' expr: id' ' type: int' ' tag: 1' ' value expressions:' ' expr: id' ' type: int' ' expr: key' ' type: string' ' expr: value' ' type: string' ' t3 ' ' TableScan' ' alias: t3' ' Filter Operator' ' predicate:' ' expr: (id = 20)' ' type: boolean' ' Reduce Output Operator' ' key expressions:' ' expr: id' ' type: int' ' sort order: +' ' Map-reduce partition columns:' ' expr: id' ' type: int' ' tag: 2' ' value expressions:' ' expr: id' ' type: int' ' expr: key' ' type: string' ' expr: value' ' type: string' ' Reduce Operator Tree:' ' Join Operator' ' condition map:' ' Inner Join 0 to 1' ' Left Outer Join1 to 2' ' condition expressions:' ' 0 {VALUE._col0} {VALUE._col1} {VALUE._col2}' ' 1 {VALUE._col0} {VALUE._col1} {VALUE._col2}' ' 2 {VALUE._col0} {VALUE._col1} {VALUE._col2}' ' handleSkewJoin: false' ' outputColumnNames: _col0, _col1, _col2, _col5, _col6, _col7, _col10, _col11, _col12' ' Select Operator' ' expressions:' ' expr: _col0' ' type: int' ' expr: _col1' ' type: string' ' expr: _col2' ' type: string' ' expr: _col5' ' type: int' ' expr: _col6' ' type: string' ' expr: _col7' ' type: string' ' expr: _col10' ' type: int' ' expr: _col11' ' type: string' ' expr: _col12' ' type: string' ' outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8' ' 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' '' '' 124 rows selected >>> explain select * from t1 join t2 on (t1.id=t2.id) left outer join t3 on (t1.id=t3.id) where t2.id=20; 'Explain' 'ABSTRACT SYNTAX TREE:' ' (TOK_QUERY (TOK_FROM (TOK_LEFTOUTERJOIN (TOK_JOIN (TOK_TABREF (TOK_TABNAME t1)) (TOK_TABREF (TOK_TABNAME t2)) (= (. (TOK_TABLE_OR_COL t1) id) (. (TOK_TABLE_OR_COL t2) id))) (TOK_TABREF (TOK_TABNAME t3)) (= (. (TOK_TABLE_OR_COL t1) id) (. (TOK_TABLE_OR_COL t3) id)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_WHERE (= (. (TOK_TABLE_OR_COL t2) id) 20))))' '' 'STAGE DEPENDENCIES:' ' Stage-1 is a root stage' ' 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: (id = 20)' ' type: boolean' ' Reduce Output Operator' ' key expressions:' ' expr: id' ' type: int' ' sort order: +' ' Map-reduce partition columns:' ' expr: id' ' type: int' ' tag: 0' ' value expressions:' ' expr: id' ' type: int' ' expr: key' ' type: string' ' expr: value' ' type: string' ' t2 ' ' TableScan' ' alias: t2' ' Filter Operator' ' predicate:' ' expr: (id = 20)' ' type: boolean' ' Reduce Output Operator' ' key expressions:' ' expr: id' ' type: int' ' sort order: +' ' Map-reduce partition columns:' ' expr: id' ' type: int' ' tag: 1' ' value expressions:' ' expr: id' ' type: int' ' expr: key' ' type: string' ' expr: value' ' type: string' ' t3 ' ' TableScan' ' alias: t3' ' Filter Operator' ' predicate:' ' expr: (id = 20)' ' type: boolean' ' Reduce Output Operator' ' key expressions:' ' expr: id' ' type: int' ' sort order: +' ' Map-reduce partition columns:' ' expr: id' ' type: int' ' tag: 2' ' value expressions:' ' expr: id' ' type: int' ' expr: key' ' type: string' ' expr: value' ' type: string' ' Reduce Operator Tree:' ' Join Operator' ' condition map:' ' Inner Join 0 to 1' ' Left Outer Join0 to 2' ' condition expressions:' ' 0 {VALUE._col0} {VALUE._col1} {VALUE._col2}' ' 1 {VALUE._col0} {VALUE._col1} {VALUE._col2}' ' 2 {VALUE._col0} {VALUE._col1} {VALUE._col2}' ' handleSkewJoin: false' ' outputColumnNames: _col0, _col1, _col2, _col5, _col6, _col7, _col10, _col11, _col12' ' Select Operator' ' expressions:' ' expr: _col0' ' type: int' ' expr: _col1' ' type: string' ' expr: _col2' ' type: string' ' expr: _col5' ' type: int' ' expr: _col6' ' type: string' ' expr: _col7' ' type: string' ' expr: _col10' ' type: int' ' expr: _col11' ' type: string' ' expr: _col12' ' type: string' ' outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8' ' 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' '' '' 124 rows selected >>> >>> drop table t1; No rows affected >>> drop table t2; No rows affected >>> drop table t3; No rows affected >>> drop table t4; No rows affected >>> !record