PageRenderTime 14ms CodeModel.GetById 12ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/release-0.0.0-rc0/hive/external/ql/src/test/queries/clientpositive/udf_elt.q

#
text | 29 lines | 27 code | 2 blank | 0 comment | 0 complexity | a34d1f8645912802d4460a8cac212dbf MD5 | raw file
 1DESCRIBE FUNCTION elt;
 2DESCRIBE FUNCTION EXTENDED elt;
 3
 4EXPLAIN
 5SELECT elt(2, 'abc', 'defg'),
 6       elt(3, 'aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'gg'),
 7       elt('1', 'abc', 'defg'),
 8       elt(2, 'aa', CAST('2' AS TINYINT)),
 9       elt(2, 'aa', CAST('12345' AS SMALLINT)),
10       elt(2, 'aa', CAST('123456789012' AS BIGINT)),
11       elt(2, 'aa', CAST(1.25 AS FLOAT)),
12       elt(2, 'aa', CAST(16.0 AS DOUBLE)),
13       elt(null, 'abc', 'defg'),
14       elt(0, 'abc', 'defg'),
15       elt(3, 'abc', 'defg')
16FROM src LIMIT 1;
17
18SELECT elt(2, 'abc', 'defg'),
19       elt(3, 'aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'gg'),
20       elt('1', 'abc', 'defg'),
21       elt(2, 'aa', CAST('2' AS TINYINT)),
22       elt(2, 'aa', CAST('12345' AS SMALLINT)),
23       elt(2, 'aa', CAST('123456789012' AS BIGINT)),
24       elt(2, 'aa', CAST(1.25 AS FLOAT)),
25       elt(2, 'aa', CAST(16.0 AS DOUBLE)),
26       elt(null, 'abc', 'defg'),
27       elt(0, 'abc', 'defg'),
28       elt(3, 'abc', 'defg')
29FROM src LIMIT 1;