PageRenderTime 22ms CodeModel.GetById 13ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
text | 160 lines | 155 code | 5 blank | 0 comment | 0 complexity | bb9bb2b04ca6fa729818a5f4b61ad983 MD5 | raw file
  1PREHOOK: query: DESCRIBE FUNCTION locate
  2PREHOOK: type: DESCFUNCTION
  3POSTHOOK: query: DESCRIBE FUNCTION locate
  4POSTHOOK: type: DESCFUNCTION
  5locate(substr, str[, pos]) - Returns the position of the first occurance of substr in str after position pos
  6PREHOOK: query: DESCRIBE FUNCTION EXTENDED locate
  7PREHOOK: type: DESCFUNCTION
  8POSTHOOK: query: DESCRIBE FUNCTION EXTENDED locate
  9POSTHOOK: type: DESCFUNCTION
 10locate(substr, str[, pos]) - Returns the position of the first occurance of substr in str after position pos
 11Example:
 12  > SELECT locate('bar', 'foobarbar', 5) FROM src LIMIT 1;
 13  7
 14PREHOOK: query: EXPLAIN
 15SELECT locate('abc', 'abcd'),
 16       locate('ccc', 'abcabc'),
 17       locate('23', 123),
 18       locate(23, 123),
 19       locate('abc', 'abcabc', 2),
 20       locate('abc', 'abcabc', '2'),
 21       locate(1, TRUE),
 22       locate(1, FALSE),
 23       locate(CAST('2' AS TINYINT), '12345'),
 24       locate('34', CAST('12345' AS SMALLINT)),
 25       locate('456', CAST('123456789012' AS BIGINT)),
 26       locate('.25', CAST(1.25 AS FLOAT)),
 27       locate('.0', CAST(16.0 AS DOUBLE)),
 28       locate(null, 'abc'),
 29       locate('abc', null),
 30       locate('abc', 'abcd', null),
 31       locate('abc', 'abcd', 'invalid number')
 32FROM src LIMIT 1
 33PREHOOK: type: QUERY
 34POSTHOOK: query: EXPLAIN
 35SELECT locate('abc', 'abcd'),
 36       locate('ccc', 'abcabc'),
 37       locate('23', 123),
 38       locate(23, 123),
 39       locate('abc', 'abcabc', 2),
 40       locate('abc', 'abcabc', '2'),
 41       locate(1, TRUE),
 42       locate(1, FALSE),
 43       locate(CAST('2' AS TINYINT), '12345'),
 44       locate('34', CAST('12345' AS SMALLINT)),
 45       locate('456', CAST('123456789012' AS BIGINT)),
 46       locate('.25', CAST(1.25 AS FLOAT)),
 47       locate('.0', CAST(16.0 AS DOUBLE)),
 48       locate(null, 'abc'),
 49       locate('abc', null),
 50       locate('abc', 'abcd', null),
 51       locate('abc', 'abcd', 'invalid number')
 52FROM src LIMIT 1
 53POSTHOOK: type: QUERY
 54ABSTRACT SYNTAX TREE:
 55  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME src))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_FUNCTION locate 'abc' 'abcd')) (TOK_SELEXPR (TOK_FUNCTION locate 'ccc' 'abcabc')) (TOK_SELEXPR (TOK_FUNCTION locate '23' 123)) (TOK_SELEXPR (TOK_FUNCTION locate 23 123)) (TOK_SELEXPR (TOK_FUNCTION locate 'abc' 'abcabc' 2)) (TOK_SELEXPR (TOK_FUNCTION locate 'abc' 'abcabc' '2')) (TOK_SELEXPR (TOK_FUNCTION locate 1 TRUE)) (TOK_SELEXPR (TOK_FUNCTION locate 1 FALSE)) (TOK_SELEXPR (TOK_FUNCTION locate (TOK_FUNCTION TOK_TINYINT '2') '12345')) (TOK_SELEXPR (TOK_FUNCTION locate '34' (TOK_FUNCTION TOK_SMALLINT '12345'))) (TOK_SELEXPR (TOK_FUNCTION locate '456' (TOK_FUNCTION TOK_BIGINT '123456789012'))) (TOK_SELEXPR (TOK_FUNCTION locate '.25' (TOK_FUNCTION TOK_FLOAT 1.25))) (TOK_SELEXPR (TOK_FUNCTION locate '.0' (TOK_FUNCTION TOK_DOUBLE 16.0))) (TOK_SELEXPR (TOK_FUNCTION locate TOK_NULL 'abc')) (TOK_SELEXPR (TOK_FUNCTION locate 'abc' TOK_NULL)) (TOK_SELEXPR (TOK_FUNCTION locate 'abc' 'abcd' TOK_NULL)) (TOK_SELEXPR (TOK_FUNCTION locate 'abc' 'abcd' 'invalid number'))) (TOK_LIMIT 1)))
 56
 57STAGE DEPENDENCIES:
 58  Stage-1 is a root stage
 59  Stage-0 is a root stage
 60
 61STAGE PLANS:
 62  Stage: Stage-1
 63    Map Reduce
 64      Alias -> Map Operator Tree:
 65        src 
 66          TableScan
 67            alias: src
 68            Select Operator
 69              expressions:
 70                    expr: locate('abc''abcd')
 71                    type: int
 72                    expr: locate('ccc''abcabc')
 73                    type: int
 74                    expr: locate('23'123)
 75                    type: int
 76                    expr: locate(23123)
 77                    type: int
 78                    expr: locate('abc''abcabc'2)
 79                    type: int
 80                    expr: locate('abc''abcabc''2')
 81                    type: int
 82                    expr: locate(1true)
 83                    type: int
 84                    expr: locate(1false)
 85                    type: int
 86                    expr: locate(UDFToByte('2')'12345')
 87                    type: int
 88                    expr: locate('34'UDFToShort('12345'))
 89                    type: int
 90                    expr: locate('456'UDFToLong('123456789012'))
 91                    type: int
 92                    expr: locate('.25'UDFToFloat(1.25))
 93                    type: int
 94                    expr: locate('.0'16.0)
 95                    type: int
 96                    expr: locate(null'abc')
 97                    type: int
 98                    expr: locate('abc'null)
 99                    type: int
100                    expr: locate('abc''abcd'null)
101                    type: int
102                    expr: locate('abc''abcd''invalid number')
103                    type: int
104              outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16
105              Limit
106                File Output Operator
107                  compressed: false
108                  GlobalTableId: 0
109                  table:
110                      input format: org.apache.hadoop.mapred.TextInputFormat
111                      output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
112
113  Stage: Stage-0
114    Fetch Operator
115      limit: 1
116
117
118PREHOOK: query: SELECT locate('abc', 'abcd'),
119       locate('ccc', 'abcabc'),
120       locate('23', 123),
121       locate(23, 123),
122       locate('abc', 'abcabc', 2),
123       locate('abc', 'abcabc', '2'),
124       locate(1, TRUE),
125       locate(1, FALSE),
126       locate(CAST('2' AS TINYINT), '12345'),
127       locate('34', CAST('12345' AS SMALLINT)),
128       locate('456', CAST('123456789012' AS BIGINT)),
129       locate('.25', CAST(1.25 AS FLOAT)),
130       locate('.0', CAST(16.0 AS DOUBLE)),
131       locate(null, 'abc'),
132       locate('abc', null),
133       locate('abc', 'abcd', null),
134       locate('abc', 'abcd', 'invalid number')
135FROM src LIMIT 1
136PREHOOK: type: QUERY
137PREHOOK: Input: default@src
138PREHOOK: Output: file:/tmp/sdong/hive_2011-02-10_17-36-32_203_8538275688018137143/-mr-10000
139POSTHOOK: query: SELECT locate('abc', 'abcd'),
140       locate('ccc', 'abcabc'),
141       locate('23', 123),
142       locate(23, 123),
143       locate('abc', 'abcabc', 2),
144       locate('abc', 'abcabc', '2'),
145       locate(1, TRUE),
146       locate(1, FALSE),
147       locate(CAST('2' AS TINYINT), '12345'),
148       locate('34', CAST('12345' AS SMALLINT)),
149       locate('456', CAST('123456789012' AS BIGINT)),
150       locate('.25', CAST(1.25 AS FLOAT)),
151       locate('.0', CAST(16.0 AS DOUBLE)),
152       locate(null, 'abc'),
153       locate('abc', null),
154       locate('abc', 'abcd', null),
155       locate('abc', 'abcd', 'invalid number')
156FROM src LIMIT 1
157POSTHOOK: type: QUERY
158POSTHOOK: Input: default@src
159POSTHOOK: Output: file:/tmp/sdong/hive_2011-02-10_17-36-32_203_8538275688018137143/-mr-10000
1601	0	2	2	4	4	0	0	2	3	4	2	3	NULL	NULL	0	0