PageRenderTime 24ms CodeModel.GetById 9ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/release-0.0.0-rc0/hive/external/ql/src/test/results/clientpositive/lateral_view.q.out

#
text | 940 lines | 909 code | 31 blank | 0 comment | 0 complexity | ae48513b7a67473ed7fe7b3bbcd7a465 MD5 | raw file
  1PREHOOK: query: CREATE TABLE tmp_pyang_lv (inputs string) STORED AS RCFILE
  2PREHOOK: type: CREATETABLE
  3POSTHOOK: query: CREATE TABLE tmp_pyang_lv (inputs string) STORED AS RCFILE
  4POSTHOOK: type: CREATETABLE
  5POSTHOOK: Output: default@tmp_pyang_lv
  6PREHOOK: query: INSERT OVERWRITE TABLE tmp_pyang_lv SELECT key FROM src
  7PREHOOK: type: QUERY
  8PREHOOK: Input: default@src
  9PREHOOK: Output: default@tmp_pyang_lv
 10POSTHOOK: query: INSERT OVERWRITE TABLE tmp_pyang_lv SELECT key FROM src
 11POSTHOOK: type: QUERY
 12POSTHOOK: Input: default@src
 13POSTHOOK: Output: default@tmp_pyang_lv
 14POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 15PREHOOK: query: EXPLAIN SELECT * FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol SORT BY key ASC, myCol ASC LIMIT 1
 16PREHOOK: type: QUERY
 17POSTHOOK: query: EXPLAIN SELECT * FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol SORT BY key ASC, myCol ASC LIMIT 1
 18POSTHOOK: type: QUERY
 19POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
 20ABSTRACT SYNTAX TREE:
 21  (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)))
 22
 23STAGE DEPENDENCIES:
 24  Stage-1 is a root stage
 25  Stage-2 depends on stages: Stage-1
 26  Stage-0 is a root stage
 27
 28STAGE PLANS:
 29  Stage: Stage-1
 30    Map Reduce
 31      Alias -> Map Operator Tree:
 32        src 
 33          TableScan
 34            alias: src
 35            Lateral View Forward
 36              Select Operator
 37                SELECT * : (no compute)
 38                Lateral View Join Operator
 39                  outputColumnNames: _col0, _col1, _col2
 40                  Select Operator
 41                    expressions:
 42                          expr: _col0
 43                          type: string
 44                          expr: _col1
 45                          type: string
 46                          expr: _col2
 47                          type: int
 48                    outputColumnNames: _col0, _col1, _col2
 49                    Reduce Output Operator
 50                      key expressions:
 51                            expr: _col0
 52                            type: string
 53                            expr: _col2
 54                            type: int
 55                      sort order: ++
 56                      tag: -1
 57                      value expressions:
 58                            expr: _col0
 59                            type: string
 60                            expr: _col1
 61                            type: string
 62                            expr: _col2
 63                            type: int
 64              Select Operator
 65                expressions:
 66                      expr: array(1,2,3)
 67                      type: array<int>
 68                outputColumnNames: _col0
 69                UDTF Operator
 70                  function name: explode
 71                  Lateral View Join Operator
 72                    outputColumnNames: _col0, _col1, _col2
 73                    Select Operator
 74                      expressions:
 75                            expr: _col0
 76                            type: string
 77                            expr: _col1
 78                            type: string
 79                            expr: _col2
 80                            type: int
 81                      outputColumnNames: _col0, _col1, _col2
 82                      Reduce Output Operator
 83                        key expressions:
 84                              expr: _col0
 85                              type: string
 86                              expr: _col2
 87                              type: int
 88                        sort order: ++
 89                        tag: -1
 90                        value expressions:
 91                              expr: _col0
 92                              type: string
 93                              expr: _col1
 94                              type: string
 95                              expr: _col2
 96                              type: int
 97      Reduce Operator Tree:
 98        Extract
 99          Limit
100            File Output Operator
101              compressed: false
102              GlobalTableId: 0
103              table:
104                  input format: org.apache.hadoop.mapred.SequenceFileInputFormat
105                  output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
106
107  Stage: Stage-2
108    Map Reduce
109      Alias -> Map Operator Tree:
110        file:/tmp/sdong/hive_2011-02-10_16-29-02_402_7594296411239609393/-mr-10002 
111            Reduce Output Operator
112              key expressions:
113                    expr: _col0
114                    type: string
115                    expr: _col2
116                    type: int
117              sort order: ++
118              tag: -1
119              value expressions:
120                    expr: _col0
121                    type: string
122                    expr: _col1
123                    type: string
124                    expr: _col2
125                    type: int
126      Reduce Operator Tree:
127        Extract
128          Limit
129            File Output Operator
130              compressed: false
131              GlobalTableId: 0
132              table:
133                  input format: org.apache.hadoop.mapred.TextInputFormat
134                  output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
135
136  Stage: Stage-0
137    Fetch Operator
138      limit: 1
139
140
141PREHOOK: query: EXPLAIN SELECT myTable.* FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol LIMIT 3
142PREHOOK: type: QUERY
143POSTHOOK: query: EXPLAIN SELECT myTable.* FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol LIMIT 3
144POSTHOOK: type: QUERY
145POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
146ABSTRACT SYNTAX TREE:
147  (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)))
148
149STAGE DEPENDENCIES:
150  Stage-1 is a root stage
151  Stage-0 is a root stage
152
153STAGE PLANS:
154  Stage: Stage-1
155    Map Reduce
156      Alias -> Map Operator Tree:
157        src 
158          TableScan
159            alias: src
160            Lateral View Forward
161              Select Operator
162                SELECT * : (no compute)
163                Lateral View Join Operator
164                  outputColumnNames: _col0, _col1, _col2
165                  Select Operator
166                    expressions:
167                          expr: _col2
168                          type: int
169                    outputColumnNames: _col0
170                    Limit
171                      File Output Operator
172                        compressed: false
173                        GlobalTableId: 0
174                        table:
175                            input format: org.apache.hadoop.mapred.TextInputFormat
176                            output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
177              Select Operator
178                expressions:
179                      expr: array(1,2,3)
180                      type: array<int>
181                outputColumnNames: _col0
182                UDTF Operator
183                  function name: explode
184                  Lateral View Join Operator
185                    outputColumnNames: _col0, _col1, _col2
186                    Select Operator
187                      expressions:
188                            expr: _col2
189                            type: int
190                      outputColumnNames: _col0
191                      Limit
192                        File Output Operator
193                          compressed: false
194                          GlobalTableId: 0
195                          table:
196                              input format: org.apache.hadoop.mapred.TextInputFormat
197                              output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
198
199  Stage: Stage-0
200    Fetch Operator
201      limit: 3
202
203
204PREHOOK: 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
205PREHOOK: type: QUERY
206POSTHOOK: 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
207POSTHOOK: type: QUERY
208POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
209ABSTRACT SYNTAX TREE:
210  (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)))
211
212STAGE DEPENDENCIES:
213  Stage-1 is a root stage
214  Stage-0 is a root stage
215
216STAGE PLANS:
217  Stage: Stage-1
218    Map Reduce
219      Alias -> Map Operator Tree:
220        src 
221          TableScan
222            alias: src
223            Lateral View Forward
224              Select Operator
225                SELECT * : (no compute)
226                Lateral View Join Operator
227                  outputColumnNames: _col0, _col1, _col2
228                  Lateral View Forward
229                    Select Operator
230                      SELECT * : (no compute)
231                      Lateral View Join Operator
232                        outputColumnNames: _col0, _col1, _col2, _col3
233                        Select Operator
234                          expressions:
235                                expr: _col2
236                                type: int
237                                expr: _col3
238                                type: string
239                          outputColumnNames: _col0, _col1
240                          Limit
241                            File Output Operator
242                              compressed: false
243                              GlobalTableId: 0
244                              table:
245                                  input format: org.apache.hadoop.mapred.TextInputFormat
246                                  output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
247                    Select Operator
248                      expressions:
249                            expr: array('a','b','c')
250                            type: array<string>
251                      outputColumnNames: _col0
252                      UDTF Operator
253                        function name: explode
254                        Lateral View Join Operator
255                          outputColumnNames: _col0, _col1, _col2, _col3
256                          Select Operator
257                            expressions:
258                                  expr: _col2
259                                  type: int
260                                  expr: _col3
261                                  type: string
262                            outputColumnNames: _col0, _col1
263                            Limit
264                              File Output Operator
265                                compressed: false
266                                GlobalTableId: 0
267                                table:
268                                    input format: org.apache.hadoop.mapred.TextInputFormat
269                                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
270              Select Operator
271                expressions:
272                      expr: array(1,2,3)
273                      type: array<int>
274                outputColumnNames: _col0
275                UDTF Operator
276                  function name: explode
277                  Lateral View Join Operator
278                    outputColumnNames: _col0, _col1, _col2
279                    Lateral View Forward
280                      Select Operator
281                        SELECT * : (no compute)
282                        Lateral View Join Operator
283                          outputColumnNames: _col0, _col1, _col2, _col3
284                          Select Operator
285                            expressions:
286                                  expr: _col2
287                                  type: int
288                                  expr: _col3
289                                  type: string
290                            outputColumnNames: _col0, _col1
291                            Limit
292                              File Output Operator
293                                compressed: false
294                                GlobalTableId: 0
295                                table:
296                                    input format: org.apache.hadoop.mapred.TextInputFormat
297                                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
298                      Select Operator
299                        expressions:
300                              expr: array('a','b','c')
301                              type: array<string>
302                        outputColumnNames: _col0
303                        UDTF Operator
304                          function name: explode
305                          Lateral View Join Operator
306                            outputColumnNames: _col0, _col1, _col2, _col3
307                            Select Operator
308                              expressions:
309                                    expr: _col2
310                                    type: int
311                                    expr: _col3
312                                    type: string
313                              outputColumnNames: _col0, _col1
314                              Limit
315                                File Output Operator
316                                  compressed: false
317                                  GlobalTableId: 0
318                                  table:
319                                      input format: org.apache.hadoop.mapred.TextInputFormat
320                                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
321
322  Stage: Stage-0
323    Fetch Operator
324      limit: 9
325
326
327PREHOOK: 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
328PREHOOK: type: QUERY
329POSTHOOK: 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
330POSTHOOK: type: QUERY
331POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
332ABSTRACT SYNTAX TREE:
333  (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)))
334
335STAGE DEPENDENCIES:
336  Stage-1 is a root stage
337  Stage-0 is a root stage
338
339STAGE PLANS:
340  Stage: Stage-1
341    Map Reduce
342      Alias -> Map Operator Tree:
343        src 
344          TableScan
345            alias: src
346            Lateral View Forward
347              Select Operator
348                SELECT * : (no compute)
349                Lateral View Join Operator
350                  outputColumnNames: _col0, _col1, _col2
351                  Lateral View Forward
352                    Select Operator
353                      SELECT * : (no compute)
354                      Lateral View Join Operator
355                        outputColumnNames: _col0, _col1, _col2, _col3
356                        Select Operator
357                          expressions:
358                                expr: _col3
359                                type: int
360                          outputColumnNames: _col0
361                          Limit
362                            File Output Operator
363                              compressed: false
364                              GlobalTableId: 0
365                              table:
366                                  input format: org.apache.hadoop.mapred.TextInputFormat
367                                  output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
368                    Select Operator
369                      expressions:
370                            expr: _col2
371                            type: array<int>
372                      outputColumnNames: _col0
373                      UDTF Operator
374                        function name: explode
375                        Lateral View Join Operator
376                          outputColumnNames: _col0, _col1, _col2, _col3
377                          Select Operator
378                            expressions:
379                                  expr: _col3
380                                  type: int
381                            outputColumnNames: _col0
382                            Limit
383                              File Output Operator
384                                compressed: false
385                                GlobalTableId: 0
386                                table:
387                                    input format: org.apache.hadoop.mapred.TextInputFormat
388                                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
389              Select Operator
390                expressions:
391                      expr: array(array(1,2,3))
392                      type: array<array<int>>
393                outputColumnNames: _col0
394                UDTF Operator
395                  function name: explode
396                  Lateral View Join Operator
397                    outputColumnNames: _col0, _col1, _col2
398                    Lateral View Forward
399                      Select Operator
400                        SELECT * : (no compute)
401                        Lateral View Join Operator
402                          outputColumnNames: _col0, _col1, _col2, _col3
403                          Select Operator
404                            expressions:
405                                  expr: _col3
406                                  type: int
407                            outputColumnNames: _col0
408                            Limit
409                              File Output Operator
410                                compressed: false
411                                GlobalTableId: 0
412                                table:
413                                    input format: org.apache.hadoop.mapred.TextInputFormat
414                                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
415                      Select Operator
416                        expressions:
417                              expr: _col2
418                              type: array<int>
419                        outputColumnNames: _col0
420                        UDTF Operator
421                          function name: explode
422                          Lateral View Join Operator
423                            outputColumnNames: _col0, _col1, _col2, _col3
424                            Select Operator
425                              expressions:
426                                    expr: _col3
427                                    type: int
428                              outputColumnNames: _col0
429                              Limit
430                                File Output Operator
431                                  compressed: false
432                                  GlobalTableId: 0
433                                  table:
434                                      input format: org.apache.hadoop.mapred.TextInputFormat
435                                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
436
437  Stage: Stage-0
438    Fetch Operator
439      limit: 3
440
441
442PREHOOK: query: -- Verify that * selects columns from both tables
443SELECT * FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol SORT BY key ASC, myCol ASC LIMIT 1
444PREHOOK: type: QUERY
445PREHOOK: Input: default@src
446PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-02_729_205682555561259435/-mr-10000
447POSTHOOK: query: -- Verify that * selects columns from both tables
448SELECT * FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol SORT BY key ASC, myCol ASC LIMIT 1
449POSTHOOK: type: QUERY
450POSTHOOK: Input: default@src
451POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-02_729_205682555561259435/-mr-10000
452POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
4530	val_0	1
454PREHOOK: query: -- TABLE.* should be supported
455SELECT myTable.* FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol LIMIT 3
456PREHOOK: type: QUERY
457PREHOOK: Input: default@src
458PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-09_295_2505782742476744902/-mr-10000
459POSTHOOK: query: -- TABLE.* should be supported
460SELECT myTable.* FROM src LATERAL VIEW explode(array(1,2,3)) myTable AS myCol LIMIT 3
461POSTHOOK: type: QUERY
462POSTHOOK: Input: default@src
463POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-09_295_2505782742476744902/-mr-10000
464POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
4651
4662
4673
468PREHOOK: query: -- Multiple lateral views should result in a Cartesian product
469SELECT 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
470PREHOOK: type: QUERY
471PREHOOK: Input: default@src
472PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-12_619_6077823979519528691/-mr-10000
473POSTHOOK: query: -- Multiple lateral views should result in a Cartesian product
474SELECT 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
475POSTHOOK: type: QUERY
476POSTHOOK: Input: default@src
477POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-12_619_6077823979519528691/-mr-10000
478POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
4791	a
4801	b
4811	c
4822	a
4832	b
4842	c
4853	a
4863	b
4873	c
488PREHOOK: query: -- Should be able to reference tables generated earlier
489SELECT myTable2.* FROM src LATERAL VIEW explode(array(array(1,2,3))) myTable AS myCol LATERAL VIEW explode(myTable.myCol) myTable2 AS myCol2 LIMIT 3
490PREHOOK: type: QUERY
491PREHOOK: Input: default@src
492PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-16_064_2217988687106915683/-mr-10000
493POSTHOOK: query: -- Should be able to reference tables generated earlier
494SELECT myTable2.* FROM src LATERAL VIEW explode(array(array(1,2,3))) myTable AS myCol LATERAL VIEW explode(myTable.myCol) myTable2 AS myCol2 LIMIT 3
495POSTHOOK: type: QUERY
496POSTHOOK: Input: default@src
497POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-16_064_2217988687106915683/-mr-10000
498POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
4991
5002
5013
502PREHOOK: query: EXPLAIN
503SELECT myCol from tmp_pyang_lv LATERAL VIEW explode(array(1,2,3)) myTab as myCol limit 3
504PREHOOK: type: QUERY
505POSTHOOK: query: EXPLAIN
506SELECT myCol from tmp_pyang_lv LATERAL VIEW explode(array(1,2,3)) myTab as myCol limit 3
507POSTHOOK: type: QUERY
508POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
509ABSTRACT SYNTAX TREE:
510  (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)))
511
512STAGE DEPENDENCIES:
513  Stage-1 is a root stage
514  Stage-0 is a root stage
515
516STAGE PLANS:
517  Stage: Stage-1
518    Map Reduce
519      Alias -> Map Operator Tree:
520        tmp_pyang_lv 
521          TableScan
522            alias: tmp_pyang_lv
523            Lateral View Forward
524              Select Operator
525                SELECT * : (no compute)
526                Lateral View Join Operator
527                  outputColumnNames: _col0, _col1
528                  Select Operator
529                    expressions:
530                          expr: _col1
531                          type: int
532                    outputColumnNames: _col0
533                    Limit
534                      File Output Operator
535                        compressed: false
536                        GlobalTableId: 0
537                        table:
538                            input format: org.apache.hadoop.mapred.TextInputFormat
539                            output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
540              Select Operator
541                expressions:
542                      expr: array(1,2,3)
543                      type: array<int>
544                outputColumnNames: _col0
545                UDTF Operator
546                  function name: explode
547                  Lateral View Join Operator
548                    outputColumnNames: _col0, _col1
549                    Select Operator
550                      expressions:
551                            expr: _col1
552                            type: int
553                      outputColumnNames: _col0
554                      Limit
555                        File Output Operator
556                          compressed: false
557                          GlobalTableId: 0
558                          table:
559                              input format: org.apache.hadoop.mapred.TextInputFormat
560                              output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
561
562  Stage: Stage-0
563    Fetch Operator
564      limit: 3
565
566
567PREHOOK: query: SELECT myCol from tmp_PYANG_lv LATERAL VIEW explode(array(1,2,3)) myTab as myCol limit 3
568PREHOOK: type: QUERY
569PREHOOK: Input: default@tmp_pyang_lv
570PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-19_576_2283639595696470136/-mr-10000
571POSTHOOK: query: SELECT myCol from tmp_PYANG_lv LATERAL VIEW explode(array(1,2,3)) myTab as myCol limit 3
572POSTHOOK: type: QUERY
573POSTHOOK: Input: default@tmp_pyang_lv
574POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-19_576_2283639595696470136/-mr-10000
575POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
5761
5772
5783
579PREHOOK: query: CREATE TABLE tmp_pyang_src_rcfile (key string, value array<string>) STORED AS RCFILE
580PREHOOK: type: CREATETABLE
581POSTHOOK: query: CREATE TABLE tmp_pyang_src_rcfile (key string, value array<string>) STORED AS RCFILE
582POSTHOOK: type: CREATETABLE
583POSTHOOK: Output: default@tmp_pyang_src_rcfile
584POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
585PREHOOK: query: INSERT OVERWRITE TABLE tmp_pyang_src_rcfile SELECT key, array(value) FROM src ORDER BY key LIMIT 20
586PREHOOK: type: QUERY
587PREHOOK: Input: default@src
588PREHOOK: Output: default@tmp_pyang_src_rcfile
589POSTHOOK: query: INSERT OVERWRITE TABLE tmp_pyang_src_rcfile SELECT key, array(value) FROM src ORDER BY key LIMIT 20
590POSTHOOK: type: QUERY
591POSTHOOK: Input: default@src
592POSTHOOK: Output: default@tmp_pyang_src_rcfile
593POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
594POSTHOOK: Lineage: tmp_pyang_src_rcfile.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
595POSTHOOK: Lineage: tmp_pyang_src_rcfile.value EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
596PREHOOK: query: SELECT key,value from tmp_pyang_src_rcfile LATERAL VIEW explode(value) myTable AS myCol
597PREHOOK: type: QUERY
598PREHOOK: Input: default@tmp_pyang_src_rcfile
599PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-30_471_5303128627208314686/-mr-10000
600POSTHOOK: query: SELECT key,value from tmp_pyang_src_rcfile LATERAL VIEW explode(value) myTable AS myCol
601POSTHOOK: type: QUERY
602POSTHOOK: Input: default@tmp_pyang_src_rcfile
603POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-30_471_5303128627208314686/-mr-10000
604POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
605POSTHOOK: Lineage: tmp_pyang_src_rcfile.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
606POSTHOOK: Lineage: tmp_pyang_src_rcfile.value EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
6070	["val_0"]
6080	["val_0"]
6090	["val_0"]
61010	["val_10"]
611100	["val_100"]
612100	["val_100"]
613103	["val_103"]
614103	["val_103"]
615104	["val_104"]
616104	["val_104"]
617105	["val_105"]
61811	["val_11"]
619111	["val_111"]
620113	["val_113"]
621113	["val_113"]
622114	["val_114"]
623116	["val_116"]
624118	["val_118"]
625118	["val_118"]
626119	["val_119"]
627PREHOOK: query: SELECT myCol from tmp_pyang_src_rcfile LATERAL VIEW explode(value) myTable AS myCol
628PREHOOK: type: QUERY
629PREHOOK: Input: default@tmp_pyang_src_rcfile
630PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-33_783_1146265769626074137/-mr-10000
631POSTHOOK: query: SELECT myCol from tmp_pyang_src_rcfile LATERAL VIEW explode(value) myTable AS myCol
632POSTHOOK: type: QUERY
633POSTHOOK: Input: default@tmp_pyang_src_rcfile
634POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-33_783_1146265769626074137/-mr-10000
635POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
636POSTHOOK: Lineage: tmp_pyang_src_rcfile.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
637POSTHOOK: Lineage: tmp_pyang_src_rcfile.value EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
638val_0
639val_0
640val_0
641val_10
642val_100
643val_100
644val_103
645val_103
646val_104
647val_104
648val_105
649val_11
650val_111
651val_113
652val_113
653val_114
654val_116
655val_118
656val_118
657val_119
658PREHOOK: query: SELECT * from tmp_pyang_src_rcfile LATERAL VIEW explode(value) myTable AS myCol
659PREHOOK: type: QUERY
660PREHOOK: Input: default@tmp_pyang_src_rcfile
661PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-37_103_4143805227896340217/-mr-10000
662POSTHOOK: query: SELECT * from tmp_pyang_src_rcfile LATERAL VIEW explode(value) myTable AS myCol
663POSTHOOK: type: QUERY
664POSTHOOK: Input: default@tmp_pyang_src_rcfile
665POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-37_103_4143805227896340217/-mr-10000
666POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
667POSTHOOK: Lineage: tmp_pyang_src_rcfile.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
668POSTHOOK: Lineage: tmp_pyang_src_rcfile.value EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
6690	["val_0"]	val_0
6700	["val_0"]	val_0
6710	["val_0"]	val_0
67210	["val_10"]	val_10
673100	["val_100"]	val_100
674100	["val_100"]	val_100
675103	["val_103"]	val_103
676103	["val_103"]	val_103
677104	["val_104"]	val_104
678104	["val_104"]	val_104
679105	["val_105"]	val_105
68011	["val_11"]	val_11
681111	["val_111"]	val_111
682113	["val_113"]	val_113
683113	["val_113"]	val_113
684114	["val_114"]	val_114
685116	["val_116"]	val_116
686118	["val_118"]	val_118
687118	["val_118"]	val_118
688119	["val_119"]	val_119
689PREHOOK: query: SELECT subq.key,subq.value 
690FROM (
691SELECT * from tmp_pyang_src_rcfile LATERAL VIEW explode(value) myTable AS myCol
692)subq
693PREHOOK: type: QUERY
694PREHOOK: Input: default@tmp_pyang_src_rcfile
695PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-40_427_6742023612535673657/-mr-10000
696POSTHOOK: query: SELECT subq.key,subq.value 
697FROM (
698SELECT * from tmp_pyang_src_rcfile LATERAL VIEW explode(value) myTable AS myCol
699)subq
700POSTHOOK: type: QUERY
701POSTHOOK: Input: default@tmp_pyang_src_rcfile
702POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-40_427_6742023612535673657/-mr-10000
703POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
704POSTHOOK: Lineage: tmp_pyang_src_rcfile.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
705POSTHOOK: Lineage: tmp_pyang_src_rcfile.value EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
7060	["val_0"]
7070	["val_0"]
7080	["val_0"]
70910	["val_10"]
710100	["val_100"]
711100	["val_100"]
712103	["val_103"]
713103	["val_103"]
714104	["val_104"]
715104	["val_104"]
716105	["val_105"]
71711	["val_11"]
718111	["val_111"]
719113	["val_113"]
720113	["val_113"]
721114	["val_114"]
722116	["val_116"]
723118	["val_118"]
724118	["val_118"]
725119	["val_119"]
726PREHOOK: query: SELECT subq.myCol
727FROM (
728SELECT * from tmp_pyang_src_rcfile LATERAL VIEW explode(value) myTable AS myCol
729)subq
730PREHOOK: type: QUERY
731PREHOOK: Input: default@tmp_pyang_src_rcfile
732PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-43_749_1238874552855937545/-mr-10000
733POSTHOOK: query: SELECT subq.myCol
734FROM (
735SELECT * from tmp_pyang_src_rcfile LATERAL VIEW explode(value) myTable AS myCol
736)subq
737POSTHOOK: type: QUERY
738POSTHOOK: Input: default@tmp_pyang_src_rcfile
739POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-43_749_1238874552855937545/-mr-10000
740POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
741POSTHOOK: Lineage: tmp_pyang_src_rcfile.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
742POSTHOOK: Lineage: tmp_pyang_src_rcfile.value EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
743val_0
744val_0
745val_0
746val_10
747val_100
748val_100
749val_103
750val_103
751val_104
752val_104
753val_105
754val_11
755val_111
756val_113
757val_113
758val_114
759val_116
760val_118
761val_118
762val_119
763PREHOOK: query: SELECT subq.key 
764FROM (
765SELECT key, value from tmp_pyang_src_rcfile LATERAL VIEW explode(value) myTable AS myCol
766)subq
767PREHOOK: type: QUERY
768PREHOOK: Input: default@tmp_pyang_src_rcfile
769PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-47_067_9022053012103959759/-mr-10000
770POSTHOOK: query: SELECT subq.key 
771FROM (
772SELECT key, value from tmp_pyang_src_rcfile LATERAL VIEW explode(value) myTable AS myCol
773)subq
774POSTHOOK: type: QUERY
775POSTHOOK: Input: default@tmp_pyang_src_rcfile
776POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-47_067_9022053012103959759/-mr-10000
777POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
778POSTHOOK: Lineage: tmp_pyang_src_rcfile.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
779POSTHOOK: Lineage: tmp_pyang_src_rcfile.value EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
7800
7810
7820
78310
784100
785100
786103
787103
788104
789104
790105
79111
792111
793113
794113
795114
796116
797118
798118
799119
800PREHOOK: query: EXPLAIN SELECT value, myCol from (SELECT key, array(value[0]) AS value FROM tmp_pyang_src_rcfile GROUP BY value[0], key) a
801LATERAL VIEW explode(value) myTable AS myCol
802PREHOOK: type: QUERY
803POSTHOOK: query: EXPLAIN SELECT value, myCol from (SELECT key, array(value[0]) AS value FROM tmp_pyang_src_rcfile GROUP BY value[0], key) a
804LATERAL VIEW explode(value) myTable AS myCol
805POSTHOOK: type: QUERY
806POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
807POSTHOOK: Lineage: tmp_pyang_src_rcfile.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
808POSTHOOK: Lineage: tmp_pyang_src_rcfile.value EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
809ABSTRACT SYNTAX TREE:
810  (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)))))
811
812STAGE DEPENDENCIES:
813  Stage-1 is a root stage
814  Stage-0 is a root stage
815
816STAGE PLANS:
817  Stage: Stage-1
818    Map Reduce
819      Alias -> Map Operator Tree:
820        a:tmp_pyang_src_rcfile 
821          TableScan
822            alias: tmp_pyang_src_rcfile
823            Select Operator
824              expressions:
825                    expr: value
826                    type: array<string>
827                    expr: key
828                    type: string
829              outputColumnNames: value, key
830              Group By Operator
831                bucketGroup: false
832                keys:
833                      expr: value[0]
834                      type: string
835                      expr: key
836                      type: string
837                mode: hash
838                outputColumnNames: _col0, _col1
839                Reduce Output Operator
840                  key expressions:
841                        expr: _col0
842                        type: string
843                        expr: _col1
844                        type: string
845                  sort order: ++
846                  Map-reduce partition columns:
847                        expr: _col0
848                        type: string
849                        expr: _col1
850                        type: string
851                  tag: -1
852      Reduce Operator Tree:
853        Group By Operator
854          bucketGroup: false
855          keys:
856                expr: KEY._col0
857                type: string
858                expr: KEY._col1
859                type: string
860          mode: mergepartial
861          outputColumnNames: _col0, _col1
862          Select Operator
863            expressions:
864                  expr: _col1
865                  type: string
866                  expr: array(_col0)
867                  type: array<string>
868            outputColumnNames: _col0, _col1
869            Lateral View Forward
870              Select Operator
871                SELECT * : (no compute)
872                Lateral View Join Operator
873                  outputColumnNames: _col0, _col1, _col2
874                  Select Operator
875                    expressions:
876                          expr: _col1
877                          type: array<string>
878                          expr: _col2
879                          type: string
880                    outputColumnNames: _col0, _col1
881                    File Output Operator
882                      compressed: false
883                      GlobalTableId: 0
884                      table:
885                          input format: org.apache.hadoop.mapred.TextInputFormat
886                          output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
887              Select Operator
888                expressions:
889                      expr: _col1
890                      type: array<string>
891                outputColumnNames: _col0
892                UDTF Operator
893                  function name: explode
894                  Lateral View Join Operator
895                    outputColumnNames: _col0, _col1, _col2
896                    Select Operator
897                      expressions:
898                            expr: _col1
899                            type: array<string>
900                            expr: _col2
901                            type: string
902                      outputColumnNames: _col0, _col1
903                      File Output Operator
904                        compressed: false
905                        GlobalTableId: 0
906                        table:
907                            input format: org.apache.hadoop.mapred.TextInputFormat
908                            output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
909
910  Stage: Stage-0
911    Fetch Operator
912      limit: -1
913
914
915PREHOOK: query: SELECT value, myCol from (SELECT key, array(value[0]) AS value FROM tmp_pyang_src_rcfile GROUP BY value[0], key) a
916LATERAL VIEW explode(value) myTable AS myCol
917PREHOOK: type: QUERY
918PREHOOK: Input: default@tmp_pyang_src_rcfile
919PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-50_517_5895557777710351720/-mr-10000
920POSTHOOK: query: SELECT value, myCol from (SELECT key, array(value[0]) AS value FROM tmp_pyang_src_rcfile GROUP BY value[0], key) a
921LATERAL VIEW explode(value) myTable AS myCol
922POSTHOOK: type: QUERY
923POSTHOOK: Input: default@tmp_pyang_src_rcfile
924POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_16-29-50_517_5895557777710351720/-mr-10000
925POSTHOOK: Lineage: tmp_pyang_lv.inputs SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
926POSTHOOK: Lineage: tmp_pyang_src_rcfile.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
927POSTHOOK: Lineage: tmp_pyang_src_rcfile.value EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
928["val_0"]	val_0
929["val_10"]	val_10
930["val_100"]	val_100
931["val_103"]	val_103
932["val_104"]	val_104
933["val_105"]	val_105
934["val_11"]	val_11
935["val_111"]	val_111
936["val_113"]	val_113
937["val_114"]	val_114
938["val_116"]	val_116
939["val_118"]	val_118
940["val_119"]	val_119