PREHOOK: query: DESCRIBE FUNCTION xpath_long
PREHOOK: type: DESCFUNCTION
POSTHOOK: query: DESCRIBE FUNCTION xpath_long
POSTHOOK: type: DESCFUNCTION
xpath_long(xml, xpath) - Returns a long value that matches the xpath expression
PREHOOK: query: DESCRIBE FUNCTION EXTENDED xpath_long
PREHOOK: type: DESCFUNCTION
POSTHOOK: query: DESCRIBE FUNCTION EXTENDED xpath_long
POSTHOOK: type: DESCFUNCTION
xpath_long(xml, xpath) - Returns a long value that matches the xpath expression
Example:
> SELECT xpath_long('12','sum(a/b)') FROM src LIMIT 1;
3
PREHOOK: query: SELECT xpath_long ('this is not a number', 'a') FROM src tablesample (1 rows)
PREHOOK: type: QUERY
PREHOOK: Input: default@src
#### A masked pattern was here ####
POSTHOOK: query: SELECT xpath_long ('this is not a number', 'a') FROM src tablesample (1 rows)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
#### A masked pattern was here ####
0
PREHOOK: query: SELECT xpath_long ('this 2 is not a number', 'a') FROM src tablesample (1 rows)
PREHOOK: type: QUERY
PREHOOK: Input: default@src
#### A masked pattern was here ####
POSTHOOK: query: SELECT xpath_long ('this 2 is not a number', 'a') FROM src tablesample (1 rows)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
#### A masked pattern was here ####
0
PREHOOK: query: SELECT xpath_long ('200000000040000000000', 'a/b * a/c') FROM src tablesample (1 rows)
PREHOOK: type: QUERY
PREHOOK: Input: default@src
#### A masked pattern was here ####
POSTHOOK: query: SELECT xpath_long ('200000000040000000000', 'a/b * a/c') FROM src tablesample (1 rows)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
#### A masked pattern was here ####
9223372036854775807
PREHOOK: query: SELECT xpath_long ('try a boolean', 'a = 10') FROM src tablesample (1 rows)
PREHOOK: type: QUERY
PREHOOK: Input: default@src
#### A masked pattern was here ####
POSTHOOK: query: SELECT xpath_long ('try a boolean', 'a = 10') FROM src tablesample (1 rows)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
#### A masked pattern was here ####
0
PREHOOK: query: SELECT xpath_long ('1248', 'a/b') FROM src tablesample (1 rows)
PREHOOK: type: QUERY
PREHOOK: Input: default@src
#### A masked pattern was here ####
POSTHOOK: query: SELECT xpath_long ('1248', 'a/b') FROM src tablesample (1 rows)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
#### A masked pattern was here ####
1
PREHOOK: query: SELECT xpath_long ('1248', 'sum(a/*)') FROM src tablesample (1 rows)
PREHOOK: type: QUERY
PREHOOK: Input: default@src
#### A masked pattern was here ####
POSTHOOK: query: SELECT xpath_long ('1248', 'sum(a/*)') FROM src tablesample (1 rows)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
#### A masked pattern was here ####
15
PREHOOK: query: SELECT xpath_long ('1248', 'sum(a/b)') FROM src tablesample (1 rows)
PREHOOK: type: QUERY
PREHOOK: Input: default@src
#### A masked pattern was here ####
POSTHOOK: query: SELECT xpath_long ('1248', 'sum(a/b)') FROM src tablesample (1 rows)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
#### A masked pattern was here ####
7
PREHOOK: query: SELECT xpath_long ('1248', 'sum(a/b[@class="odd"])') FROM src tablesample (1 rows)
PREHOOK: type: QUERY
PREHOOK: Input: default@src
#### A masked pattern was here ####
POSTHOOK: query: SELECT xpath_long ('1248', 'sum(a/b[@class="odd"])') FROM src tablesample (1 rows)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@src
#### A masked pattern was here ####
5