PREHOOK: query: DESCRIBE FUNCTION xpath_short
PREHOOK: type: DESCFUNCTION
POSTHOOK: query: DESCRIBE FUNCTION xpath_short
POSTHOOK: type: DESCFUNCTION
xpath_short(xml, xpath) - Returns a short value that matches the xpath expression
PREHOOK: query: DESCRIBE FUNCTION EXTENDED xpath_short
PREHOOK: type: DESCFUNCTION
POSTHOOK: query: DESCRIBE FUNCTION EXTENDED xpath_short
POSTHOOK: type: DESCFUNCTION
xpath_short(xml, xpath) - Returns a short value that matches the xpath expression
Example:
> SELECT xpath_short('12','sum(a/b)') FROM src LIMIT 1;
3
PREHOOK: query: SELECT xpath_short ('this is not a number', 'a') FROM src LIMIT 1
PREHOOK: type: QUERY
PREHOOK: Input: default@src
PREHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/43003016/10000
POSTHOOK: query: SELECT xpath_short ('this is not a number', 'a') FROM src LIMIT 1
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
POSTHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/43003016/10000
0
PREHOOK: query: SELECT xpath_short ('this 2 is not a number', 'a') FROM src LIMIT 1
PREHOOK: type: QUERY
PREHOOK: Input: default@src
PREHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/420344977/10000
POSTHOOK: query: SELECT xpath_short ('this 2 is not a number', 'a') FROM src LIMIT 1
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
POSTHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/420344977/10000
0
PREHOOK: query: SELECT xpath_short ('200000000040000000000', 'a/b * a/c') FROM src LIMIT 1
PREHOOK: type: QUERY
PREHOOK: Input: default@src
PREHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/542896770/10000
POSTHOOK: query: SELECT xpath_short ('200000000040000000000', 'a/b * a/c') FROM src LIMIT 1
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
POSTHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/542896770/10000
-1
PREHOOK: query: SELECT xpath_short ('try a boolean', 'a = 10') FROM src LIMIT 1
PREHOOK: type: QUERY
PREHOOK: Input: default@src
PREHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/1699233281/10000
POSTHOOK: query: SELECT xpath_short ('try a boolean', 'a = 10') FROM src LIMIT 1
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
POSTHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/1699233281/10000
0
PREHOOK: query: SELECT xpath_short ('1248', 'a/b') FROM src LIMIT 1
PREHOOK: type: QUERY
PREHOOK: Input: default@src
PREHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/1504264750/10000
POSTHOOK: query: SELECT xpath_short ('1248', 'a/b') FROM src LIMIT 1
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
POSTHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/1504264750/10000
1
PREHOOK: query: SELECT xpath_short ('1248', 'sum(a/*)') FROM src LIMIT 1
PREHOOK: type: QUERY
PREHOOK: Input: default@src
PREHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/1166661278/10000
POSTHOOK: query: SELECT xpath_short ('1248', 'sum(a/*)') FROM src LIMIT 1
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
POSTHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/1166661278/10000
15
PREHOOK: query: SELECT xpath_short ('1248', 'sum(a/b)') FROM src LIMIT 1
PREHOOK: type: QUERY
PREHOOK: Input: default@src
PREHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/633201724/10000
POSTHOOK: query: SELECT xpath_short ('1248', 'sum(a/b)') FROM src LIMIT 1
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
POSTHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/633201724/10000
7
PREHOOK: query: SELECT xpath_short ('1248', 'sum(a/b[@class="odd"])') FROM src LIMIT 1
PREHOOK: type: QUERY
PREHOOK: Input: default@src
PREHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/1825578599/10000
POSTHOOK: query: SELECT xpath_short ('1248', 'sum(a/b[@class="odd"])') FROM src LIMIT 1
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
POSTHOOK: Output: file:/Users/patrick/Documents/workspace/hive-trunk/build/ql/tmp/1825578599/10000
5