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

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

#
text | 57 lines | 55 code | 2 blank | 0 comment | 0 complexity | 96a90fe8a7ffd2b87b2b4c71b2f540b7 MD5 | raw file
 1DESCRIBE FUNCTION when;
 2DESCRIBE FUNCTION EXTENDED when;
 3
 4EXPLAIN
 5SELECT CASE
 6        WHEN 1=1 THEN 2
 7        WHEN 1=3 THEN 4
 8        ELSE 5
 9       END,
10       CASE
11        WHEN 6=7 THEN 8
12        ELSE 9
13       END,
14       CASE
15        WHEN 10=11 THEN 12
16        WHEN 13=13 THEN 14
17       END,
18       CASE
19        WHEN 15=16 THEN 17
20        WHEN 18=19 THEN 20
21       END,
22       CASE
23        WHEN 21=22 THEN NULL
24        WHEN 23=23 THEN 24
25       END,
26       CASE
27        WHEN 25=26 THEN 27
28        WHEN 28=28 THEN NULL
29       END
30FROM src LIMIT 1;
31
32SELECT CASE
33        WHEN 1=1 THEN 2
34        WHEN 1=3 THEN 4
35        ELSE 5
36       END,
37       CASE
38        WHEN 6=7 THEN 8
39        ELSE 9
40       END,
41       CASE
42        WHEN 10=11 THEN 12
43        WHEN 13=13 THEN 14
44       END,
45       CASE
46        WHEN 15=16 THEN 17
47        WHEN 18=19 THEN 20
48       END,
49       CASE
50        WHEN 21=22 THEN NULL
51        WHEN 23=23 THEN 24
52       END,
53       CASE
54        WHEN 25=26 THEN 27
55        WHEN 28=28 THEN NULL
56       END
57FROM src LIMIT 1;