PREHOOK: query: CREATE TABLE tmp_pyang_lv (inputs string) STORED AS RCFILE PREHOOK: type: CREATETABLE POSTHOOK: query: CREATE TABLE tmp_pyang_lv (inputs string) STORED AS RCFILE POSTHOOK: type: CREATETABLE POSTHOOK: Output: default@tmp_pyang_lv PREHOOK: query: INSERT OVERWRITE TABLE tmp_pyang_lv SELECT key FROM src PREHOOK: type: QUERY PREHOOK: Input: default@src PREHOOK: Output: default@tmp_pyang_lv POSTHOOK: query: INSERT OVERWRITE TABLE tmp_pyang_lv SELECT key FROM src POSTHOOK: type: QUERY POSTHOOK: Input: default@src POSTHOOK: Output: default@tmp_pyang_lv POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] PREHOOK: query: EXPLAIN SELECT * FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol SORT BY key ASC, myCol ASC LIMIT 1 PREHOOK: type: QUERY POSTHOOK: query: EXPLAIN SELECT * FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol SORT BY key ASC, myCol ASC LIMIT 1 POSTHOOK: type: QUERY POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] ABSTRACT SYNTAX TREE: (TOK_QUERY (TOK_FROM (TOK_LATERAL_VIEW (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION explode (TOK_FUNCTION array 1 2 3)) myCol (TOK_TABALIAS myTable))) (TOK_TABREF (TOK_TABNAME src)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL key)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL myCol))) (TOK_LIMIT 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: src TableScan alias: src Lateral View Forward Select Operator SELECT * : (no compute) Lateral View Join Operator outputColumnNames: _col0, _col1, _col2 Select Operator expressions: expr: _col0 type: string expr: _col1 type: string expr: _col2 type: int outputColumnNames: _col0, _col1, _col2 Reduce Output Operator key expressions: expr: _col0 type: string expr: _col2 type: int sort order: ++ tag: -1 value expressions: expr: _col0 type: string expr: _col1 type: string expr: _col2 type: int Select Operator expressions: expr: array(1,2,3) type: array outputColumnNames: _col0 UDTF Operator function name: explode Lateral View Join Operator outputColumnNames: _col0, _col1, _col2 Select Operator expressions: expr: _col0 type: string expr: _col1 type: string expr: _col2 type: int outputColumnNames: _col0, _col1, _col2 Reduce Output Operator key expressions: expr: _col0 type: string expr: _col2 type: int sort order: ++ tag: -1 value expressions: expr: _col0 type: string expr: _col1 type: string expr: _col2 type: int Reduce Operator Tree: Extract Limit 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:/tmp/sdong/hive_2011-02-10_16-29-02_402_7594296411239609393/-mr-10002 Reduce Output Operator key expressions: expr: _col0 type: string expr: _col2 type: int sort order: ++ tag: -1 value expressions: expr: _col0 type: string expr: _col1 type: string expr: _col2 type: int Reduce Operator Tree: Extract Limit 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: EXPLAIN SELECT myTable.* FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol LIMIT 3 PREHOOK: type: QUERY POSTHOOK: query: EXPLAIN SELECT myTable.* FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol LIMIT 3 POSTHOOK: type: QUERY POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] ABSTRACT SYNTAX TREE: (TOK_QUERY (TOK_FROM (TOK_LATERAL_VIEW (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION explode (TOK_FUNCTION array 1 2 3)) myCol (TOK_TABALIAS myTable))) (TOK_TABREF (TOK_TABNAME src)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_ALLCOLREF (TOK_TABNAME myTable)))) (TOK_LIMIT 3))) 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: src TableScan alias: src Lateral View Forward Select Operator SELECT * : (no compute) Lateral View Join Operator outputColumnNames: _col0, _col1, _col2 Select Operator expressions: expr: _col2 type: int outputColumnNames: _col0 Limit File Output Operator compressed: false GlobalTableId: 0 table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Select Operator expressions: expr: array(1,2,3) type: array outputColumnNames: _col0 UDTF Operator function name: explode Lateral View Join Operator outputColumnNames: _col0, _col1, _col2 Select Operator expressions: expr: _col2 type: int outputColumnNames: _col0 Limit 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: 3 PREHOOK: query: EXPLAIN SELECT myTable.myCol, myTable2.myCol2 FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol LATERAL VIEW explode(array('a', 'b', 'c')) myTable2 AS myCol2 LIMIT 9 PREHOOK: type: QUERY POSTHOOK: query: EXPLAIN SELECT myTable.myCol, myTable2.myCol2 FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol LATERAL VIEW explode(array('a', 'b', 'c')) myTable2 AS myCol2 LIMIT 9 POSTHOOK: type: QUERY POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] ABSTRACT SYNTAX TREE: (TOK_QUERY (TOK_FROM (TOK_LATERAL_VIEW (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION explode (TOK_FUNCTION array 'a' 'b' 'c')) myCol2 (TOK_TABALIAS myTable2))) (TOK_LATERAL_VIEW (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION explode (TOK_FUNCTION array 1 2 3)) myCol (TOK_TABALIAS myTable))) (TOK_TABREF (TOK_TABNAME src))))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL myTable) myCol)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL myTable2) myCol2))) (TOK_LIMIT 9))) 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: src TableScan alias: src Lateral View Forward Select Operator SELECT * : (no compute) Lateral View Join Operator outputColumnNames: _col0, _col1, _col2 Lateral View Forward Select Operator SELECT * : (no compute) Lateral View Join Operator outputColumnNames: _col0, _col1, _col2, _col3 Select Operator expressions: expr: _col2 type: int expr: _col3 type: string outputColumnNames: _col0, _col1 Limit File Output Operator compressed: false GlobalTableId: 0 table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Select Operator expressions: expr: array('a','b','c') type: array outputColumnNames: _col0 UDTF Operator function name: explode Lateral View Join Operator outputColumnNames: _col0, _col1, _col2, _col3 Select Operator expressions: expr: _col2 type: int expr: _col3 type: string outputColumnNames: _col0, _col1 Limit File Output Operator compressed: false GlobalTableId: 0 table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Select Operator expressions: expr: array(1,2,3) type: array outputColumnNames: _col0 UDTF Operator function name: explode Lateral View Join Operator outputColumnNames: _col0, _col1, _col2 Lateral View Forward Select Operator SELECT * : (no compute) Lateral View Join Operator outputColumnNames: _col0, _col1, _col2, _col3 Select Operator expressions: expr: _col2 type: int expr: _col3 type: string outputColumnNames: _col0, _col1 Limit File Output Operator compressed: false GlobalTableId: 0 table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Select Operator expressions: expr: array('a','b','c') type: array outputColumnNames: _col0 UDTF Operator function name: explode Lateral View Join Operator outputColumnNames: _col0, _col1, _col2, _col3 Select Operator expressions: expr: _col2 type: int expr: _col3 type: string outputColumnNames: _col0, _col1 Limit 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: 9 PREHOOK: query: EXPLAIN SELECT myTable2.* FROM src LATERAL VIEW explode(array(array(1,2,3))) myTable AS myCol LATERAL VIEW explode(myTable.myCol) myTable2 AS myCol2 LIMIT 3 PREHOOK: type: QUERY POSTHOOK: query: EXPLAIN SELECT myTable2.* FROM src LATERAL VIEW explode(array(array(1,2,3))) myTable AS myCol LATERAL VIEW explode(myTable.myCol) myTable2 AS myCol2 LIMIT 3 POSTHOOK: type: QUERY POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] ABSTRACT SYNTAX TREE: (TOK_QUERY (TOK_FROM (TOK_LATERAL_VIEW (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION explode (. (TOK_TABLE_OR_COL myTable) myCol)) myCol2 (TOK_TABALIAS myTable2))) (TOK_LATERAL_VIEW (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION explode (TOK_FUNCTION array (TOK_FUNCTION array 1 2 3))) myCol (TOK_TABALIAS myTable))) (TOK_TABREF (TOK_TABNAME src))))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_ALLCOLREF (TOK_TABNAME myTable2)))) (TOK_LIMIT 3))) 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: src TableScan alias: src Lateral View Forward Select Operator SELECT * : (no compute) Lateral View Join Operator outputColumnNames: _col0, _col1, _col2 Lateral View Forward Select Operator SELECT * : (no compute) Lateral View Join Operator outputColumnNames: _col0, _col1, _col2, _col3 Select Operator expressions: expr: _col3 type: int outputColumnNames: _col0 Limit File Output Operator compressed: false GlobalTableId: 0 table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Select Operator expressions: expr: _col2 type: array outputColumnNames: _col0 UDTF Operator function name: explode Lateral View Join Operator outputColumnNames: _col0, _col1, _col2, _col3 Select Operator expressions: expr: _col3 type: int outputColumnNames: _col0 Limit File Output Operator compressed: false GlobalTableId: 0 table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Select Operator expressions: expr: array(array(1,2,3)) type: array> outputColumnNames: _col0 UDTF Operator function name: explode Lateral View Join Operator outputColumnNames: _col0, _col1, _col2 Lateral View Forward Select Operator SELECT * : (no compute) Lateral View Join Operator outputColumnNames: _col0, _col1, _col2, _col3 Select Operator expressions: expr: _col3 type: int outputColumnNames: _col0 Limit File Output Operator compressed: false GlobalTableId: 0 table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Select Operator expressions: expr: _col2 type: array outputColumnNames: _col0 UDTF Operator function name: explode Lateral View Join Operator outputColumnNames: _col0, _col1, _col2, _col3 Select Operator expressions: expr: _col3 type: int outputColumnNames: _col0 Limit 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: 3 PREHOOK: query: -- Verify that * selects columns from both tables SELECT * FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol SORT BY key ASC, myCol ASC LIMIT 1 PREHOOK: type: QUERY PREHOOK: Input: default@src PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-02_729_205682555561259435/-mr-10000 POSTHOOK: query: -- Verify that * selects columns from both tables SELECT * FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol SORT BY key ASC, myCol ASC LIMIT 1 POSTHOOK: type: QUERY POSTHOOK: Input: default@src POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-02_729_205682555561259435/-mr-10000 POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] 0 val_0 1 PREHOOK: query: -- TABLE.* should be supported SELECT myTable.* FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol LIMIT 3 PREHOOK: type: QUERY PREHOOK: Input: default@src PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-09_295_2505782742476744902/-mr-10000 POSTHOOK: query: -- TABLE.* should be supported SELECT myTable.* FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol LIMIT 3 POSTHOOK: type: QUERY POSTHOOK: Input: default@src POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-09_295_2505782742476744902/-mr-10000 POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] 1 2 3 PREHOOK: query: -- Multiple lateral views should result in a Cartesian product SELECT myTable.myCol, myTable2.myCol2 FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol LATERAL VIEW explode(array('a', 'b', 'c')) myTable2 AS myCol2 LIMIT 9 PREHOOK: type: QUERY PREHOOK: Input: default@src PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-12_619_6077823979519528691/-mr-10000 POSTHOOK: query: -- Multiple lateral views should result in a Cartesian product SELECT myTable.myCol, myTable2.myCol2 FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol LATERAL VIEW explode(array('a', 'b', 'c')) myTable2 AS myCol2 LIMIT 9 POSTHOOK: type: QUERY POSTHOOK: Input: default@src POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-12_619_6077823979519528691/-mr-10000 POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] 1 a 1 b 1 c 2 a 2 b 2 c 3 a 3 b 3 c PREHOOK: query: -- Should be able to reference tables generated earlier SELECT myTable2.* FROM src LATERAL VIEW explode(array(array(1,2,3))) myTable AS myCol LATERAL VIEW explode(myTable.myCol) myTable2 AS myCol2 LIMIT 3 PREHOOK: type: QUERY PREHOOK: Input: default@src PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-16_064_2217988687106915683/-mr-10000 POSTHOOK: query: -- Should be able to reference tables generated earlier SELECT myTable2.* FROM src LATERAL VIEW explode(array(array(1,2,3))) myTable AS myCol LATERAL VIEW explode(myTable.myCol) myTable2 AS myCol2 LIMIT 3 POSTHOOK: type: QUERY POSTHOOK: Input: default@src POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-16_064_2217988687106915683/-mr-10000 POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] 1 2 3 PREHOOK: query: EXPLAIN SELECT myCol from tmp_pyang_lv LATERAL VIEW explode(array(1,2,3)) myTab as myCol limit 3 PREHOOK: type: QUERY POSTHOOK: query: EXPLAIN SELECT myCol from tmp_pyang_lv LATERAL VIEW explode(array(1,2,3)) myTab as myCol limit 3 POSTHOOK: type: QUERY POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] ABSTRACT SYNTAX TREE: (TOK_QUERY (TOK_FROM (TOK_LATERAL_VIEW (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION explode (TOK_FUNCTION array 1 2 3)) myCol (TOK_TABALIAS myTab))) (TOK_TABREF (TOK_TABNAME tmp_pyang_lv)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL myCol))) (TOK_LIMIT 3))) 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: tmp_pyang_lv TableScan alias: tmp_pyang_lv Lateral View Forward Select Operator SELECT * : (no compute) Lateral View Join Operator outputColumnNames: _col0, _col1 Select Operator expressions: expr: _col1 type: int outputColumnNames: _col0 Limit File Output Operator compressed: false GlobalTableId: 0 table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Select Operator expressions: expr: array(1,2,3) type: array outputColumnNames: _col0 UDTF Operator function name: explode Lateral View Join Operator outputColumnNames: _col0, _col1 Select Operator expressions: expr: _col1 type: int outputColumnNames: _col0 Limit 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: 3 PREHOOK: query: SELECT myCol from tmp_PYANG_lv LATERAL VIEW explode(array(1,2,3)) myTab as myCol limit 3 PREHOOK: type: QUERY PREHOOK: Input: default@tmp_pyang_lv PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-19_576_2283639595696470136/-mr-10000 POSTHOOK: query: SELECT myCol from tmp_PYANG_lv LATERAL VIEW explode(array(1,2,3)) myTab as myCol limit 3 POSTHOOK: type: QUERY POSTHOOK: Input: default@tmp_pyang_lv POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-19_576_2283639595696470136/-mr-10000 POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] 1 2 3 PREHOOK: query: CREATE TABLE tmp_pyang_src_rcfile (key string, value array) STORED AS RCFILE PREHOOK: type: CREATETABLE POSTHOOK: query: CREATE TABLE tmp_pyang_src_rcfile (key string, value array) STORED AS RCFILE POSTHOOK: type: CREATETABLE POSTHOOK: Output: default@tmp_pyang_src_rcfile POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] PREHOOK: query: INSERT OVERWRITE TABLE tmp_pyang_src_rcfile SELECT key, array(value) FROM src ORDER BY key LIMIT 20 PREHOOK: type: QUERY PREHOOK: Input: default@src PREHOOK: Output: default@tmp_pyang_src_rcfile POSTHOOK: query: INSERT OVERWRITE TABLE tmp_pyang_src_rcfile SELECT key, array(value) FROM src ORDER BY key LIMIT 20 POSTHOOK: type: QUERY POSTHOOK: Input: default@src POSTHOOK: Output: default@tmp_pyang_src_rcfile POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: tmp_pyang_src_rcfile.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: tmp_pyang_src_rcfile.value EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ] PREHOOK: query: SELECT key,value from tmp_pyang_src_rcfile LATERAL VIEW explode(value) myTable AS myCol PREHOOK: type: QUERY PREHOOK: Input: default@tmp_pyang_src_rcfile PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-30_471_5303128627208314686/-mr-10000 POSTHOOK: query: SELECT key,value from tmp_pyang_src_rcfile LATERAL VIEW explode(value) myTable AS myCol POSTHOOK: type: QUERY POSTHOOK: Input: default@tmp_pyang_src_rcfile POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-30_471_5303128627208314686/-mr-10000 POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: tmp_pyang_src_rcfile.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: tmp_pyang_src_rcfile.value EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ] 0 ["val_0"] 0 ["val_0"] 0 ["val_0"] 10 ["val_10"] 100 ["val_100"] 100 ["val_100"] 103 ["val_103"] 103 ["val_103"] 104 ["val_104"] 104 ["val_104"] 105 ["val_105"] 11 ["val_11"] 111 ["val_111"] 113 ["val_113"] 113 ["val_113"] 114 ["val_114"] 116 ["val_116"] 118 ["val_118"] 118 ["val_118"] 119 ["val_119"] PREHOOK: query: SELECT myCol from tmp_pyang_src_rcfile LATERAL VIEW explode(value) myTable AS myCol PREHOOK: type: QUERY PREHOOK: Input: default@tmp_pyang_src_rcfile PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-33_783_1146265769626074137/-mr-10000 POSTHOOK: query: SELECT myCol from tmp_pyang_src_rcfile LATERAL VIEW explode(value) myTable AS myCol POSTHOOK: type: QUERY POSTHOOK: Input: default@tmp_pyang_src_rcfile POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-33_783_1146265769626074137/-mr-10000 POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: tmp_pyang_src_rcfile.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: tmp_pyang_src_rcfile.value EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ] val_0 val_0 val_0 val_10 val_100 val_100 val_103 val_103 val_104 val_104 val_105 val_11 val_111 val_113 val_113 val_114 val_116 val_118 val_118 val_119 PREHOOK: query: SELECT * from tmp_pyang_src_rcfile LATERAL VIEW explode(value) myTable AS myCol PREHOOK: type: QUERY PREHOOK: Input: default@tmp_pyang_src_rcfile PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-37_103_4143805227896340217/-mr-10000 POSTHOOK: query: SELECT * from tmp_pyang_src_rcfile LATERAL VIEW explode(value) myTable AS myCol POSTHOOK: type: QUERY POSTHOOK: Input: default@tmp_pyang_src_rcfile POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-37_103_4143805227896340217/-mr-10000 POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: tmp_pyang_src_rcfile.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: tmp_pyang_src_rcfile.value EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ] 0 ["val_0"] val_0 0 ["val_0"] val_0 0 ["val_0"] val_0 10 ["val_10"] val_10 100 ["val_100"] val_100 100 ["val_100"] val_100 103 ["val_103"] val_103 103 ["val_103"] val_103 104 ["val_104"] val_104 104 ["val_104"] val_104 105 ["val_105"] val_105 11 ["val_11"] val_11 111 ["val_111"] val_111 113 ["val_113"] val_113 113 ["val_113"] val_113 114 ["val_114"] val_114 116 ["val_116"] val_116 118 ["val_118"] val_118 118 ["val_118"] val_118 119 ["val_119"] val_119 PREHOOK: query: SELECT subq.key,subq.value FROM ( SELECT * from tmp_pyang_src_rcfile LATERAL VIEW explode(value) myTable AS myCol )subq PREHOOK: type: QUERY PREHOOK: Input: default@tmp_pyang_src_rcfile PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-40_427_6742023612535673657/-mr-10000 POSTHOOK: query: SELECT subq.key,subq.value FROM ( SELECT * from tmp_pyang_src_rcfile LATERAL VIEW explode(value) myTable AS myCol )subq POSTHOOK: type: QUERY POSTHOOK: Input: default@tmp_pyang_src_rcfile POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-40_427_6742023612535673657/-mr-10000 POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: tmp_pyang_src_rcfile.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: tmp_pyang_src_rcfile.value EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ] 0 ["val_0"] 0 ["val_0"] 0 ["val_0"] 10 ["val_10"] 100 ["val_100"] 100 ["val_100"] 103 ["val_103"] 103 ["val_103"] 104 ["val_104"] 104 ["val_104"] 105 ["val_105"] 11 ["val_11"] 111 ["val_111"] 113 ["val_113"] 113 ["val_113"] 114 ["val_114"] 116 ["val_116"] 118 ["val_118"] 118 ["val_118"] 119 ["val_119"] PREHOOK: query: SELECT subq.myCol FROM ( SELECT * from tmp_pyang_src_rcfile LATERAL VIEW explode(value) myTable AS myCol )subq PREHOOK: type: QUERY PREHOOK: Input: default@tmp_pyang_src_rcfile PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-43_749_1238874552855937545/-mr-10000 POSTHOOK: query: SELECT subq.myCol FROM ( SELECT * from tmp_pyang_src_rcfile LATERAL VIEW explode(value) myTable AS myCol )subq POSTHOOK: type: QUERY POSTHOOK: Input: default@tmp_pyang_src_rcfile POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-43_749_1238874552855937545/-mr-10000 POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: tmp_pyang_src_rcfile.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: tmp_pyang_src_rcfile.value EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ] val_0 val_0 val_0 val_10 val_100 val_100 val_103 val_103 val_104 val_104 val_105 val_11 val_111 val_113 val_113 val_114 val_116 val_118 val_118 val_119 PREHOOK: query: SELECT subq.key FROM ( SELECT key, value from tmp_pyang_src_rcfile LATERAL VIEW explode(value) myTable AS myCol )subq PREHOOK: type: QUERY PREHOOK: Input: default@tmp_pyang_src_rcfile PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-47_067_9022053012103959759/-mr-10000 POSTHOOK: query: SELECT subq.key FROM ( SELECT key, value from tmp_pyang_src_rcfile LATERAL VIEW explode(value) myTable AS myCol )subq POSTHOOK: type: QUERY POSTHOOK: Input: default@tmp_pyang_src_rcfile POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-47_067_9022053012103959759/-mr-10000 POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: tmp_pyang_src_rcfile.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: tmp_pyang_src_rcfile.value EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ] 0 0 0 10 100 100 103 103 104 104 105 11 111 113 113 114 116 118 118 119 PREHOOK: query: EXPLAIN SELECT value, myCol from (SELECT key, array(value[0]) AS value FROM tmp_pyang_src_rcfile GROUP BY value[0], key) a LATERAL VIEW explode(value) myTable AS myCol PREHOOK: type: QUERY POSTHOOK: query: EXPLAIN SELECT value, myCol from (SELECT key, array(value[0]) AS value FROM tmp_pyang_src_rcfile GROUP BY value[0], key) a LATERAL VIEW explode(value) myTable AS myCol POSTHOOK: type: QUERY POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: tmp_pyang_src_rcfile.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: tmp_pyang_src_rcfile.value EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ] ABSTRACT SYNTAX TREE: (TOK_QUERY (TOK_FROM (TOK_LATERAL_VIEW (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION explode (TOK_TABLE_OR_COL value)) myCol (TOK_TABALIAS myTable))) (TOK_SUBQUERY (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME tmp_pyang_src_rcfile))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_FUNCTION array ([ (TOK_TABLE_OR_COL value) 0)) value)) (TOK_GROUPBY ([ (TOK_TABLE_OR_COL value) 0) (TOK_TABLE_OR_COL key)))) a))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL value)) (TOK_SELEXPR (TOK_TABLE_OR_COL myCol))))) 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: a:tmp_pyang_src_rcfile TableScan alias: tmp_pyang_src_rcfile Select Operator expressions: expr: value type: array expr: key type: string outputColumnNames: value, key Group By Operator bucketGroup: false keys: expr: value[0] type: string expr: key type: string mode: hash outputColumnNames: _col0, _col1 Reduce Output Operator key expressions: expr: _col0 type: string expr: _col1 type: string sort order: ++ Map-reduce partition columns: expr: _col0 type: string expr: _col1 type: string tag: -1 Reduce Operator Tree: Group By Operator bucketGroup: false keys: expr: KEY._col0 type: string expr: KEY._col1 type: string mode: mergepartial outputColumnNames: _col0, _col1 Select Operator expressions: expr: _col1 type: string expr: array(_col0) type: array outputColumnNames: _col0, _col1 Lateral View Forward Select Operator SELECT * : (no compute) Lateral View Join Operator outputColumnNames: _col0, _col1, _col2 Select Operator expressions: expr: _col1 type: array expr: _col2 type: string outputColumnNames: _col0, _col1 File Output Operator compressed: false GlobalTableId: 0 table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Select Operator expressions: expr: _col1 type: array outputColumnNames: _col0 UDTF Operator function name: explode Lateral View Join Operator outputColumnNames: _col0, _col1, _col2 Select Operator expressions: expr: _col1 type: array expr: _col2 type: string outputColumnNames: _col0, _col1 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 value, myCol from (SELECT key, array(value[0]) AS value FROM tmp_pyang_src_rcfile GROUP BY value[0], key) a LATERAL VIEW explode(value) myTable AS myCol PREHOOK: type: QUERY PREHOOK: Input: default@tmp_pyang_src_rcfile PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-50_517_5895557777710351720/-mr-10000 POSTHOOK: query: SELECT value, myCol from (SELECT key, array(value[0]) AS value FROM tmp_pyang_src_rcfile GROUP BY value[0], key) a LATERAL VIEW explode(value) myTable AS myCol POSTHOOK: type: QUERY POSTHOOK: Input: default@tmp_pyang_src_rcfile POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-50_517_5895557777710351720/-mr-10000 POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: tmp_pyang_src_rcfile.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: tmp_pyang_src_rcfile.value EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ] ["val_0"] val_0 ["val_10"] val_10 ["val_100"] val_100 ["val_103"] val_103 ["val_104"] val_104 ["val_105"] val_105 ["val_11"] val_11 ["val_111"] val_111 ["val_113"] val_113 ["val_114"] val_114 ["val_116"] val_116 ["val_118"] val_118 ["val_119"] val_119