PageRenderTime 18ms CodeModel.GetById 15ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/release-0.2.0-rc0/hive/external/ql/src/test/results/clientpositive/udf_xpath_string.q.out

#
text | 91 lines | 90 code | 1 blank | 0 comment | 0 complexity | 1aedd33f91e46de8924ded219bda63ee MD5 | raw file
 1PREHOOK: query: DESCRIBE FUNCTION xpath_string
 2PREHOOK: type: DESCFUNCTION
 3POSTHOOK: query: DESCRIBE FUNCTION xpath_string
 4POSTHOOK: type: DESCFUNCTION
 5xpath_string(xml, xpath) - Returns the text contents of the first xml node that matches the xpath expression
 6PREHOOK: query: DESCRIBE FUNCTION EXTENDED xpath_string
 7PREHOOK: type: DESCFUNCTION
 8POSTHOOK: query: DESCRIBE FUNCTION EXTENDED xpath_string
 9POSTHOOK: type: DESCFUNCTION
10xpath_string(xml, xpath) - Returns the text contents of the first xml node that matches the xpath expression
11Example:
12  > SELECT xpath_string('<a><b>b</b><c>cc</c></a>','a/c') FROM src LIMIT 1;
13  'cc'
14  > SELECT xpath_string('<a><b>b1</b><b>b2</b></a>','a/b') FROM src LIMIT 1;
15  'b1'
16  > SELECT xpath_string('<a><b>b1</b><b>b2</b></a>','a/b[2]') FROM src LIMIT 1;
17  'b2'
18  > SELECT xpath_string('<a><b>b1</b><b>b2</b></a>','a') FROM src LIMIT 1;
19  'b1b2'
20PREHOOK: query: SELECT xpath_string ('<a><b>bb</b><c>cc</c></a>', 'a') FROM src LIMIT 1
21PREHOOK: type: QUERY
22PREHOOK: Input: default@src
23PREHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/940874235/10000
24POSTHOOK: query: SELECT xpath_string ('<a><b>bb</b><c>cc</c></a>', 'a') FROM src LIMIT 1
25POSTHOOK: type: QUERY
26POSTHOOK: Input: default@src
27POSTHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/940874235/10000
28bbcc
29PREHOOK: query: SELECT xpath_string ('<a><b>bb</b><c>cc</c></a>', 'a/b') FROM src LIMIT 1
30PREHOOK: type: QUERY
31PREHOOK: Input: default@src
32PREHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/1447930808/10000
33POSTHOOK: query: SELECT xpath_string ('<a><b>bb</b><c>cc</c></a>', 'a/b') FROM src LIMIT 1
34POSTHOOK: type: QUERY
35POSTHOOK: Input: default@src
36POSTHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/1447930808/10000
37bb
38PREHOOK: query: SELECT xpath_string ('<a><b>bb</b><c>cc</c></a>', 'a/c') FROM src LIMIT 1
39PREHOOK: type: QUERY
40PREHOOK: Input: default@src
41PREHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/1556430756/10000
42POSTHOOK: query: SELECT xpath_string ('<a><b>bb</b><c>cc</c></a>', 'a/c') FROM src LIMIT 1
43POSTHOOK: type: QUERY
44POSTHOOK: Input: default@src
45POSTHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/1556430756/10000
46cc
47PREHOOK: query: SELECT xpath_string ('<a><b>bb</b><c>cc</c></a>', 'a/d') FROM src LIMIT 1
48PREHOOK: type: QUERY
49PREHOOK: Input: default@src
50PREHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/1353144403/10000
51POSTHOOK: query: SELECT xpath_string ('<a><b>bb</b><c>cc</c></a>', 'a/d') FROM src LIMIT 1
52POSTHOOK: type: QUERY
53POSTHOOK: Input: default@src
54POSTHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/1353144403/10000
55
56PREHOOK: query: SELECT xpath_string ('<a><b>b1</b><b>b2</b></a>', '//b') FROM src LIMIT 1
57PREHOOK: type: QUERY
58PREHOOK: Input: default@src
59PREHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/1184684106/10000
60POSTHOOK: query: SELECT xpath_string ('<a><b>b1</b><b>b2</b></a>', '//b') FROM src LIMIT 1
61POSTHOOK: type: QUERY
62POSTHOOK: Input: default@src
63POSTHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/1184684106/10000
64b1
65PREHOOK: query: SELECT xpath_string ('<a><b>b1</b><b>b2</b></a>', 'a/b[1]') FROM src LIMIT 1
66PREHOOK: type: QUERY
67PREHOOK: Input: default@src
68PREHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/184679872/10000
69POSTHOOK: query: SELECT xpath_string ('<a><b>b1</b><b>b2</b></a>', 'a/b[1]') FROM src LIMIT 1
70POSTHOOK: type: QUERY
71POSTHOOK: Input: default@src
72POSTHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/184679872/10000
73b1
74PREHOOK: query: SELECT xpath_string ('<a><b>b1</b><b>b2</b></a>', 'a/b[2]') FROM src LIMIT 1
75PREHOOK: type: QUERY
76PREHOOK: Input: default@src
77PREHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/1295801804/10000
78POSTHOOK: query: SELECT xpath_string ('<a><b>b1</b><b>b2</b></a>', 'a/b[2]') FROM src LIMIT 1
79POSTHOOK: type: QUERY
80POSTHOOK: Input: default@src
81POSTHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/1295801804/10000
82b2
83PREHOOK: query: SELECT xpath_string ('<a><b>b1</b><b id="b_2">b2</b></a>', 'a/b[@id="b_2"]') FROM src LIMIT 1
84PREHOOK: type: QUERY
85PREHOOK: Input: default@src
86PREHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/885790551/10000
87POSTHOOK: query: SELECT xpath_string ('<a><b>b1</b><b id="b_2">b2</b></a>', 'a/b[@id="b_2"]') FROM src LIMIT 1
88POSTHOOK: type: QUERY
89POSTHOOK: Input: default@src
90POSTHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/885790551/10000
91b2