PageRenderTime 165ms CodeModel.GetById 143ms app.highlight 11ms RepoModel.GetById 4ms app.codeStats 0ms

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

#
text | 675 lines | 655 code | 20 blank | 0 comment | 0 complexity | 005fccf2150c64af1f21fae8ddd14650 MD5 | raw file
  1PREHOOK: query: create table url_t (key string, fullurl string)
  2PREHOOK: type: CREATETABLE
  3POSTHOOK: query: create table url_t (key string, fullurl string)
  4POSTHOOK: type: CREATETABLE
  5POSTHOOK: Output: default@url_t
  6PREHOOK: query: insert overwrite table url_t
  7select * from (
  8  select '1', 'http://facebook.com/path1/p.php?k1=v1&k2=v2#Ref1' from src limit 1
  9  union all
 10  select '2', 'https://www.socs.uts.edu.au:80/MosaicDocs-old/url-primer.html?k1=tps#chapter1' from src limit 1
 11  union all
 12  select '3', 'ftp://sites.google.com/a/example.com/site/page' from src limit 1
 13  union all
 14  select '4', cast(null as string) from src limit 1
 15  union all
 16  select '5', 'htttp://' from src limit 1
 17  union all
 18  select '6', '[invalid url string]' from src limit 1
 19) s
 20PREHOOK: type: QUERY
 21PREHOOK: Input: default@src
 22PREHOOK: Output: default@url_t
 23POSTHOOK: query: insert overwrite table url_t
 24select * from (
 25  select '1', 'http://facebook.com/path1/p.php?k1=v1&k2=v2#Ref1' from src limit 1
 26  union all
 27  select '2', 'https://www.socs.uts.edu.au:80/MosaicDocs-old/url-primer.html?k1=tps#chapter1' from src limit 1
 28  union all
 29  select '3', 'ftp://sites.google.com/a/example.com/site/page' from src limit 1
 30  union all
 31  select '4', cast(null as string) from src limit 1
 32  union all
 33  select '5', 'htttp://' from src limit 1
 34  union all
 35  select '6', '[invalid url string]' from src limit 1
 36) s
 37POSTHOOK: type: QUERY
 38POSTHOOK: Input: default@src
 39POSTHOOK: Output: default@url_t
 40POSTHOOK: Lineage: url_t.fullurl EXPRESSION []
 41POSTHOOK: Lineage: url_t.key EXPRESSION []
 42PREHOOK: query: describe function parse_url_tuple
 43PREHOOK: type: DESCFUNCTION
 44POSTHOOK: query: describe function parse_url_tuple
 45POSTHOOK: type: DESCFUNCTION
 46POSTHOOK: Lineage: url_t.fullurl EXPRESSION []
 47POSTHOOK: Lineage: url_t.key EXPRESSION []
 48parse_url_tuple(url, partname1, partname2, ..., partnameN) - extracts N (N>=1) parts from a URL.
 49It takes a URL and one or multiple partnames, and returns a tuple. All the input parameters and output column types are string.
 50PREHOOK: query: describe function extended parse_url_tuple
 51PREHOOK: type: DESCFUNCTION
 52POSTHOOK: query: describe function extended parse_url_tuple
 53POSTHOOK: type: DESCFUNCTION
 54POSTHOOK: Lineage: url_t.fullurl EXPRESSION []
 55POSTHOOK: Lineage: url_t.key EXPRESSION []
 56parse_url_tuple(url, partname1, partname2, ..., partnameN) - extracts N (N>=1) parts from a URL.
 57It takes a URL and one or multiple partnames, and returns a tuple. All the input parameters and output column types are string.
 58Partname: HOST, PATH, QUERY, REF, PROTOCOL, AUTHORITY, FILE, USERINFO, QUERY:<KEY_NAME>
 59Note: Partnames are case-sensitive, and should not contain unnecessary white spaces.
 60Example:
 61  > SELECT b.* FROM src LATERAL VIEW parse_url_tuple(fullurl, 'HOST', 'PATH', 'QUERY', 'QUERY:id') b as host, path, query, query_id LIMIT 1;
 62  > SELECT parse_url_tuple(a.fullurl, 'HOST', 'PATH', 'QUERY', 'REF', 'PROTOCOL', 'FILE',  'AUTHORITY', 'USERINFO', 'QUERY:k1') as (ho, pa, qu, re, pr, fi, au, us, qk1) from src a;
 63PREHOOK: query: explain 
 64select a.key, b.* from url_t a lateral view parse_url_tuple(a.fullurl, 'HOST', 'PATH', 'QUERY', 'REF', 'PROTOCOL', 'FILE', 'AUTHORITY', 'USERINFO', 'QUERY:k1') b as ho, pa, qu, re, pr, fi, au, us, qk1 order by a.key
 65PREHOOK: type: QUERY
 66POSTHOOK: query: explain 
 67select a.key, b.* from url_t a lateral view parse_url_tuple(a.fullurl, 'HOST', 'PATH', 'QUERY', 'REF', 'PROTOCOL', 'FILE', 'AUTHORITY', 'USERINFO', 'QUERY:k1') b as ho, pa, qu, re, pr, fi, au, us, qk1 order by a.key
 68POSTHOOK: type: QUERY
 69POSTHOOK: Lineage: url_t.fullurl EXPRESSION []
 70POSTHOOK: Lineage: url_t.key EXPRESSION []
 71ABSTRACT SYNTAX TREE:
 72  (TOK_QUERY (TOK_FROM (TOK_LATERAL_VIEW (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION parse_url_tuple (. (TOK_TABLE_OR_COL a) fullurl) 'HOST' 'PATH' 'QUERY' 'REF' 'PROTOCOL' 'FILE' 'AUTHORITY' 'USERINFO' 'QUERY:k1') ho pa qu re pr fi au us qk1 (TOK_TABALIAS b))) (TOK_TABREF (TOK_TABNAME url_t) a))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) key)) (TOK_SELEXPR (TOK_ALLCOLREF (TOK_TABNAME b)))) (TOK_ORDERBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL a) key)))))
 73
 74STAGE DEPENDENCIES:
 75  Stage-1 is a root stage
 76  Stage-0 is a root stage
 77
 78STAGE PLANS:
 79  Stage: Stage-1
 80    Map Reduce
 81      Alias -> Map Operator Tree:
 82        a 
 83          TableScan
 84            alias: a
 85            Lateral View Forward
 86              Select Operator
 87                SELECT * : (no compute)
 88                Lateral View Join Operator
 89                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10
 90                  Select Operator
 91                    expressions:
 92                          expr: _col0
 93                          type: string
 94                          expr: _col2
 95                          type: string
 96                          expr: _col3
 97                          type: string
 98                          expr: _col4
 99                          type: string
100                          expr: _col5
101                          type: string
102                          expr: _col6
103                          type: string
104                          expr: _col7
105                          type: string
106                          expr: _col8
107                          type: string
108                          expr: _col9
109                          type: string
110                          expr: _col10
111                          type: string
112                    outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9
113                    Reduce Output Operator
114                      key expressions:
115                            expr: _col0
116                            type: string
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: string
126                            expr: _col3
127                            type: string
128                            expr: _col4
129                            type: string
130                            expr: _col5
131                            type: string
132                            expr: _col6
133                            type: string
134                            expr: _col7
135                            type: string
136                            expr: _col8
137                            type: string
138                            expr: _col9
139                            type: string
140              Select Operator
141                expressions:
142                      expr: fullurl
143                      type: string
144                      expr: 'HOST'
145                      type: string
146                      expr: 'PATH'
147                      type: string
148                      expr: 'QUERY'
149                      type: string
150                      expr: 'REF'
151                      type: string
152                      expr: 'PROTOCOL'
153                      type: string
154                      expr: 'FILE'
155                      type: string
156                      expr: 'AUTHORITY'
157                      type: string
158                      expr: 'USERINFO'
159                      type: string
160                      expr: 'QUERY:k1'
161                      type: string
162                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9
163                UDTF Operator
164                  function name: parse_url_tuple
165                  Lateral View Join Operator
166                    outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10
167                    Select Operator
168                      expressions:
169                            expr: _col0
170                            type: string
171                            expr: _col2
172                            type: string
173                            expr: _col3
174                            type: string
175                            expr: _col4
176                            type: string
177                            expr: _col5
178                            type: string
179                            expr: _col6
180                            type: string
181                            expr: _col7
182                            type: string
183                            expr: _col8
184                            type: string
185                            expr: _col9
186                            type: string
187                            expr: _col10
188                            type: string
189                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9
190                      Reduce Output Operator
191                        key expressions:
192                              expr: _col0
193                              type: string
194                        sort order: +
195                        tag: -1
196                        value expressions:
197                              expr: _col0
198                              type: string
199                              expr: _col1
200                              type: string
201                              expr: _col2
202                              type: string
203                              expr: _col3
204                              type: string
205                              expr: _col4
206                              type: string
207                              expr: _col5
208                              type: string
209                              expr: _col6
210                              type: string
211                              expr: _col7
212                              type: string
213                              expr: _col8
214                              type: string
215                              expr: _col9
216                              type: string
217      Reduce Operator Tree:
218        Extract
219          File Output Operator
220            compressed: false
221            GlobalTableId: 0
222            table:
223                input format: org.apache.hadoop.mapred.TextInputFormat
224                output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
225
226  Stage: Stage-0
227    Fetch Operator
228      limit: -1
229
230
231PREHOOK: query: select a.key, b.* from url_t a lateral view parse_url_tuple(a.fullurl, 'HOST', 'PATH', 'QUERY', 'REF', 'PROTOCOL', 'FILE', 'AUTHORITY', 'USERINFO', 'QUERY:k1') b as ho, pa, qu, re, pr, fi, au, us, qk1 order by a.key
232PREHOOK: type: QUERY
233PREHOOK: Input: default@url_t
234PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_17-48-08_686_2438339126682195604/-mr-10000
235POSTHOOK: query: select a.key, b.* from url_t a lateral view parse_url_tuple(a.fullurl, 'HOST', 'PATH', 'QUERY', 'REF', 'PROTOCOL', 'FILE', 'AUTHORITY', 'USERINFO', 'QUERY:k1') b as ho, pa, qu, re, pr, fi, au, us, qk1 order by a.key
236POSTHOOK: type: QUERY
237POSTHOOK: Input: default@url_t
238POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_17-48-08_686_2438339126682195604/-mr-10000
239POSTHOOK: Lineage: url_t.fullurl EXPRESSION []
240POSTHOOK: Lineage: url_t.key EXPRESSION []
2411	facebook.com	/path1/p.php	k1=v1&k2=v2	Ref1	http	/path1/p.php?k1=v1&k2=v2	facebook.com	NULL	v1
2422	www.socs.uts.edu.au	/MosaicDocs-old/url-primer.html	k1=tps	chapter1	https	/MosaicDocs-old/url-primer.html?k1=tps	www.socs.uts.edu.au:80	NULL	tps
2433	sites.google.com	/a/example.com/site/page	NULL	NULL	ftp	/a/example.com/site/page	sites.google.com	NULL	NULL
2444	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
2455	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
2466	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
247PREHOOK: query: explain 
248select parse_url_tuple(a.fullurl, 'HOST', 'PATH', 'QUERY', 'REF', 'PROTOCOL', 'FILE', 'AUTHORITY', 'USERINFO', 'QUERY:k1') as (ho, pa, qu, re, pr, fi, au, us, qk1) from url_t a order by ho, pa, qu
249PREHOOK: type: QUERY
250POSTHOOK: query: explain 
251select parse_url_tuple(a.fullurl, 'HOST', 'PATH', 'QUERY', 'REF', 'PROTOCOL', 'FILE', 'AUTHORITY', 'USERINFO', 'QUERY:k1') as (ho, pa, qu, re, pr, fi, au, us, qk1) from url_t a order by ho, pa, qu
252POSTHOOK: type: QUERY
253POSTHOOK: Lineage: url_t.fullurl EXPRESSION []
254POSTHOOK: Lineage: url_t.key EXPRESSION []
255ABSTRACT SYNTAX TREE:
256  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME url_t) a)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION parse_url_tuple (. (TOK_TABLE_OR_COL a) fullurl) 'HOST' 'PATH' 'QUERY' 'REF' 'PROTOCOL' 'FILE' 'AUTHORITY' 'USERINFO' 'QUERY:k1') ho pa qu re pr fi au us qk1)) (TOK_ORDERBY (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL ho)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL pa)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL qu)))))
257
258STAGE DEPENDENCIES:
259  Stage-1 is a root stage
260  Stage-0 is a root stage
261
262STAGE PLANS:
263  Stage: Stage-1
264    Map Reduce
265      Alias -> Map Operator Tree:
266        a 
267          TableScan
268            alias: a
269            Select Operator
270              expressions:
271                    expr: fullurl
272                    type: string
273                    expr: 'HOST'
274                    type: string
275                    expr: 'PATH'
276                    type: string
277                    expr: 'QUERY'
278                    type: string
279                    expr: 'REF'
280                    type: string
281                    expr: 'PROTOCOL'
282                    type: string
283                    expr: 'FILE'
284                    type: string
285                    expr: 'AUTHORITY'
286                    type: string
287                    expr: 'USERINFO'
288                    type: string
289                    expr: 'QUERY:k1'
290                    type: string
291              outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9
292              UDTF Operator
293                function name: parse_url_tuple
294                Reduce Output Operator
295                  key expressions:
296                        expr: c0
297                        type: string
298                        expr: c1
299                        type: string
300                        expr: c2
301                        type: string
302                  sort order: +++
303                  tag: -1
304                  value expressions:
305                        expr: c0
306                        type: string
307                        expr: c1
308                        type: string
309                        expr: c2
310                        type: string
311                        expr: c3
312                        type: string
313                        expr: c4
314                        type: string
315                        expr: c5
316                        type: string
317                        expr: c6
318                        type: string
319                        expr: c7
320                        type: string
321                        expr: c8
322                        type: string
323      Reduce Operator Tree:
324        Extract
325          File Output Operator
326            compressed: false
327            GlobalTableId: 0
328            table:
329                input format: org.apache.hadoop.mapred.TextInputFormat
330                output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
331
332  Stage: Stage-0
333    Fetch Operator
334      limit: -1
335
336
337PREHOOK: query: select parse_url_tuple(a.fullurl, 'HOST', 'PATH', 'QUERY', 'REF', 'PROTOCOL', 'FILE', 'AUTHORITY', 'USERINFO', 'QUERY:k1') as (ho, pa, qu, re, pr, fi, au, us, qk1) from url_t a order by ho, pa, qu
338PREHOOK: type: QUERY
339PREHOOK: Input: default@url_t
340PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_17-48-12_281_5919341324759760546/-mr-10000
341POSTHOOK: query: select parse_url_tuple(a.fullurl, 'HOST', 'PATH', 'QUERY', 'REF', 'PROTOCOL', 'FILE', 'AUTHORITY', 'USERINFO', 'QUERY:k1') as (ho, pa, qu, re, pr, fi, au, us, qk1) from url_t a order by ho, pa, qu
342POSTHOOK: type: QUERY
343POSTHOOK: Input: default@url_t
344POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_17-48-12_281_5919341324759760546/-mr-10000
345POSTHOOK: Lineage: url_t.fullurl EXPRESSION []
346POSTHOOK: Lineage: url_t.key EXPRESSION []
347NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
348NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
349NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
350facebook.com	/path1/p.php	k1=v1&k2=v2	Ref1	http	/path1/p.php?k1=v1&k2=v2	facebook.com	NULL	v1
351sites.google.com	/a/example.com/site/page	NULL	NULL	ftp	/a/example.com/site/page	sites.google.com	NULL	NULL
352www.socs.uts.edu.au	/MosaicDocs-old/url-primer.html	k1=tps	chapter1	https	/MosaicDocs-old/url-primer.html?k1=tps	www.socs.uts.edu.au:80	NULL	tps
353PREHOOK: query: -- should return null for 'host', 'query', 'QUERY:nonExistCol' 
354explain
355select a.key, b.ho, b.qu, b.qk1, b.err1, b.err2, b.err3 from url_t a lateral view parse_url_tuple(a.fullurl, 'HOST', 'PATH', 'QUERY', 'REF', 'PROTOCOL', 'FILE', 'AUTHORITY', 'USERINFO', 'QUERY:k1', 'host', 'query', 'QUERY:nonExistCol') b as ho, pa, qu, re, pr, fi, au, us, qk1, err1, err2, err3 order by a.key
356PREHOOK: type: QUERY
357POSTHOOK: query: -- should return null for 'host', 'query', 'QUERY:nonExistCol' 
358explain
359select a.key, b.ho, b.qu, b.qk1, b.err1, b.err2, b.err3 from url_t a lateral view parse_url_tuple(a.fullurl, 'HOST', 'PATH', 'QUERY', 'REF', 'PROTOCOL', 'FILE', 'AUTHORITY', 'USERINFO', 'QUERY:k1', 'host', 'query', 'QUERY:nonExistCol') b as ho, pa, qu, re, pr, fi, au, us, qk1, err1, err2, err3 order by a.key
360POSTHOOK: type: QUERY
361POSTHOOK: Lineage: url_t.fullurl EXPRESSION []
362POSTHOOK: Lineage: url_t.key EXPRESSION []
363ABSTRACT SYNTAX TREE:
364  (TOK_QUERY (TOK_FROM (TOK_LATERAL_VIEW (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION parse_url_tuple (. (TOK_TABLE_OR_COL a) fullurl) 'HOST' 'PATH' 'QUERY' 'REF' 'PROTOCOL' 'FILE' 'AUTHORITY' 'USERINFO' 'QUERY:k1' 'host' 'query' 'QUERY:nonExistCol') ho pa qu re pr fi au us qk1 err1 err2 err3 (TOK_TABALIAS b))) (TOK_TABREF (TOK_TABNAME url_t) a))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL a) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) ho)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) qu)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) qk1)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) err1)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) err2)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL b) err3))) (TOK_ORDERBY (TOK_TABSORTCOLNAMEASC (. (TOK_TABLE_OR_COL a) key)))))
365
366STAGE DEPENDENCIES:
367  Stage-1 is a root stage
368  Stage-0 is a root stage
369
370STAGE PLANS:
371  Stage: Stage-1
372    Map Reduce
373      Alias -> Map Operator Tree:
374        a 
375          TableScan
376            alias: a
377            Lateral View Forward
378              Select Operator
379                SELECT * : (no compute)
380                Lateral View Join Operator
381                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13
382                  Select Operator
383                    expressions:
384                          expr: _col0
385                          type: string
386                          expr: _col2
387                          type: string
388                          expr: _col4
389                          type: string
390                          expr: _col10
391                          type: string
392                          expr: _col11
393                          type: string
394                          expr: _col12
395                          type: string
396                          expr: _col13
397                          type: string
398                    outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
399                    Reduce Output Operator
400                      key expressions:
401                            expr: _col0
402                            type: string
403                      sort order: +
404                      tag: -1
405                      value expressions:
406                            expr: _col0
407                            type: string
408                            expr: _col1
409                            type: string
410                            expr: _col2
411                            type: string
412                            expr: _col3
413                            type: string
414                            expr: _col4
415                            type: string
416                            expr: _col5
417                            type: string
418                            expr: _col6
419                            type: string
420              Select Operator
421                expressions:
422                      expr: fullurl
423                      type: string
424                      expr: 'HOST'
425                      type: string
426                      expr: 'PATH'
427                      type: string
428                      expr: 'QUERY'
429                      type: string
430                      expr: 'REF'
431                      type: string
432                      expr: 'PROTOCOL'
433                      type: string
434                      expr: 'FILE'
435                      type: string
436                      expr: 'AUTHORITY'
437                      type: string
438                      expr: 'USERINFO'
439                      type: string
440                      expr: 'QUERY:k1'
441                      type: string
442                      expr: 'host'
443                      type: string
444                      expr: 'query'
445                      type: string
446                      expr: 'QUERY:nonExistCol'
447                      type: string
448                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12
449                UDTF Operator
450                  function name: parse_url_tuple
451                  Lateral View Join Operator
452                    outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13
453                    Select Operator
454                      expressions:
455                            expr: _col0
456                            type: string
457                            expr: _col2
458                            type: string
459                            expr: _col4
460                            type: string
461                            expr: _col10
462                            type: string
463                            expr: _col11
464                            type: string
465                            expr: _col12
466                            type: string
467                            expr: _col13
468                            type: string
469                      outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
470                      Reduce Output Operator
471                        key expressions:
472                              expr: _col0
473                              type: string
474                        sort order: +
475                        tag: -1
476                        value expressions:
477                              expr: _col0
478                              type: string
479                              expr: _col1
480                              type: string
481                              expr: _col2
482                              type: string
483                              expr: _col3
484                              type: string
485                              expr: _col4
486                              type: string
487                              expr: _col5
488                              type: string
489                              expr: _col6
490                              type: string
491      Reduce Operator Tree:
492        Extract
493          File Output Operator
494            compressed: false
495            GlobalTableId: 0
496            table:
497                input format: org.apache.hadoop.mapred.TextInputFormat
498                output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
499
500  Stage: Stage-0
501    Fetch Operator
502      limit: -1
503
504
505PREHOOK: query: select a.key, b.ho, b.qu, b.qk1, b.err1, b.err2, b.err3 from url_t a lateral view parse_url_tuple(a.fullurl, 'HOST', 'PATH', 'QUERY', 'REF', 'PROTOCOL', 'FILE', 'AUTHORITY', 'USERINFO', 'QUERY:k1', 'host', 'query', 'QUERY:nonExistCol') b as ho, pa, qu, re, pr, fi, au, us, qk1, err1, err2, err3 order by a.key
506PREHOOK: type: QUERY
507PREHOOK: Input: default@url_t
508PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_17-48-16_477_4910097906781584970/-mr-10000
509POSTHOOK: query: select a.key, b.ho, b.qu, b.qk1, b.err1, b.err2, b.err3 from url_t a lateral view parse_url_tuple(a.fullurl, 'HOST', 'PATH', 'QUERY', 'REF', 'PROTOCOL', 'FILE', 'AUTHORITY', 'USERINFO', 'QUERY:k1', 'host', 'query', 'QUERY:nonExistCol') b as ho, pa, qu, re, pr, fi, au, us, qk1, err1, err2, err3 order by a.key
510POSTHOOK: type: QUERY
511POSTHOOK: Input: default@url_t
512POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_17-48-16_477_4910097906781584970/-mr-10000
513POSTHOOK: Lineage: url_t.fullurl EXPRESSION []
514POSTHOOK: Lineage: url_t.key EXPRESSION []
5151	facebook.com	k1=v1&k2=v2	v1	NULL	NULL	NULL
5162	www.socs.uts.edu.au	k1=tps	tps	NULL	NULL	NULL
5173	sites.google.com	NULL	NULL	NULL	NULL	NULL
5184	NULL	NULL	NULL	NULL	NULL	NULL
5195	NULL	NULL	NULL	NULL	NULL	NULL
5206	NULL	NULL	NULL	NULL	NULL	NULL
521PREHOOK: query: explain
522select ho, count(*) from url_t a lateral view parse_url_tuple(a.fullurl, 'HOST', 'PATH', 'QUERY', 'REF', 'PROTOCOL', 'FILE', 'AUTHORITY', 'USERINFO', 'QUERY:k1') b as ho, pa, qu, re, pr, fi, au, us, qk1 where qk1 is not null group by ho
523PREHOOK: type: QUERY
524POSTHOOK: query: explain
525select ho, count(*) from url_t a lateral view parse_url_tuple(a.fullurl, 'HOST', 'PATH', 'QUERY', 'REF', 'PROTOCOL', 'FILE', 'AUTHORITY', 'USERINFO', 'QUERY:k1') b as ho, pa, qu, re, pr, fi, au, us, qk1 where qk1 is not null group by ho
526POSTHOOK: type: QUERY
527POSTHOOK: Lineage: url_t.fullurl EXPRESSION []
528POSTHOOK: Lineage: url_t.key EXPRESSION []
529ABSTRACT SYNTAX TREE:
530  (TOK_QUERY (TOK_FROM (TOK_LATERAL_VIEW (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION parse_url_tuple (. (TOK_TABLE_OR_COL a) fullurl) 'HOST' 'PATH' 'QUERY' 'REF' 'PROTOCOL' 'FILE' 'AUTHORITY' 'USERINFO' 'QUERY:k1') ho pa qu re pr fi au us qk1 (TOK_TABALIAS b))) (TOK_TABREF (TOK_TABNAME url_t) a))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL ho)) (TOK_SELEXPR (TOK_FUNCTIONSTAR count))) (TOK_WHERE (TOK_FUNCTION TOK_ISNOTNULL (TOK_TABLE_OR_COL qk1))) (TOK_GROUPBY (TOK_TABLE_OR_COL ho))))
531
532STAGE DEPENDENCIES:
533  Stage-1 is a root stage
534  Stage-0 is a root stage
535
536STAGE PLANS:
537  Stage: Stage-1
538    Map Reduce
539      Alias -> Map Operator Tree:
540        a 
541          TableScan
542            alias: a
543            Lateral View Forward
544              Select Operator
545                SELECT * : (no compute)
546                Lateral View Join Operator
547                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10
548                  Filter Operator
549                    predicate:
550                        expr: _col10 is not null
551                        type: boolean
552                    Select Operator
553                      expressions:
554                            expr: _col2
555                            type: string
556                      outputColumnNames: _col2
557                      Group By Operator
558                        aggregations:
559                              expr: count()
560                        bucketGroup: false
561                        keys:
562                              expr: _col2
563                              type: string
564                        mode: hash
565                        outputColumnNames: _col0, _col1
566                        Reduce Output Operator
567                          key expressions:
568                                expr: _col0
569                                type: string
570                          sort order: +
571                          Map-reduce partition columns:
572                                expr: _col0
573                                type: string
574                          tag: -1
575                          value expressions:
576                                expr: _col1
577                                type: bigint
578              Select Operator
579                expressions:
580                      expr: fullurl
581                      type: string
582                      expr: 'HOST'
583                      type: string
584                      expr: 'PATH'
585                      type: string
586                      expr: 'QUERY'
587                      type: string
588                      expr: 'REF'
589                      type: string
590                      expr: 'PROTOCOL'
591                      type: string
592                      expr: 'FILE'
593                      type: string
594                      expr: 'AUTHORITY'
595                      type: string
596                      expr: 'USERINFO'
597                      type: string
598                      expr: 'QUERY:k1'
599                      type: string
600                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9
601                UDTF Operator
602                  function name: parse_url_tuple
603                  Lateral View Join Operator
604                    outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10
605                    Filter Operator
606                      predicate:
607                          expr: _col10 is not null
608                          type: boolean
609                      Select Operator
610                        expressions:
611                              expr: _col2
612                              type: string
613                        outputColumnNames: _col2
614                        Group By Operator
615                          aggregations:
616                                expr: count()
617                          bucketGroup: false
618                          keys:
619                                expr: _col2
620                                type: string
621                          mode: hash
622                          outputColumnNames: _col0, _col1
623                          Reduce Output Operator
624                            key expressions:
625                                  expr: _col0
626                                  type: string
627                            sort order: +
628                            Map-reduce partition columns:
629                                  expr: _col0
630                                  type: string
631                            tag: -1
632                            value expressions:
633                                  expr: _col1
634                                  type: bigint
635      Reduce Operator Tree:
636        Group By Operator
637          aggregations:
638                expr: count(VALUE._col0)
639          bucketGroup: false
640          keys:
641                expr: KEY._col0
642                type: string
643          mode: mergepartial
644          outputColumnNames: _col0, _col1
645          Select Operator
646            expressions:
647                  expr: _col0
648                  type: string
649                  expr: _col1
650                  type: bigint
651            outputColumnNames: _col0, _col1
652            File Output Operator
653              compressed: false
654              GlobalTableId: 0
655              table:
656                  input format: org.apache.hadoop.mapred.TextInputFormat
657                  output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
658
659  Stage: Stage-0
660    Fetch Operator
661      limit: -1
662
663
664PREHOOK: query: select ho, count(*) from url_t a lateral view parse_url_tuple(a.fullurl, 'HOST', 'PATH', 'QUERY', 'REF', 'PROTOCOL', 'FILE', 'AUTHORITY', 'USERINFO', 'QUERY:k1') b as ho, pa, qu, re, pr, fi, au, us, qk1 where qk1 is not null group by ho
665PREHOOK: type: QUERY
666PREHOOK: Input: default@url_t
667PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_17-48-20_142_8723043944221910244/-mr-10000
668POSTHOOK: query: select ho, count(*) from url_t a lateral view parse_url_tuple(a.fullurl, 'HOST', 'PATH', 'QUERY', 'REF', 'PROTOCOL', 'FILE', 'AUTHORITY', 'USERINFO', 'QUERY:k1') b as ho, pa, qu, re, pr, fi, au, us, qk1 where qk1 is not null group by ho
669POSTHOOK: type: QUERY
670POSTHOOK: Input: default@url_t
671POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_17-48-20_142_8723043944221910244/-mr-10000
672POSTHOOK: Lineage: url_t.fullurl EXPRESSION []
673POSTHOOK: Lineage: url_t.key EXPRESSION []
674facebook.com	1
675www.socs.uts.edu.au	1