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

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

#
text | 27 lines | 24 code | 3 blank | 0 comment | 0 complexity | 6fe1df8169dcef0401e6d3391f5400c5 MD5 | raw file
 1set hive.optimize.ppd=true;
 2
 3EXPLAIN
 4SELECT *
 5FROM srcpart a JOIN srcpart b
 6ON a.key = b.key
 7WHERE a.ds = '2008-04-08' AND
 8      b.ds = '2008-04-08' AND
 9      CASE a.key
10        WHEN '27' THEN TRUE
11        WHEN '38' THEN FALSE
12        ELSE NULL
13       END
14ORDER BY a.key, a.value, a.ds, a.hr, b.key, b.value, b.ds, b.hr;
15
16SELECT *
17FROM srcpart a JOIN srcpart b
18ON a.key = b.key
19WHERE a.ds = '2008-04-08' AND
20      b.ds = '2008-04-08' AND
21      CASE a.key
22        WHEN '27' THEN TRUE
23        WHEN '38' THEN FALSE
24        ELSE NULL
25       END
26ORDER BY a.key, a.value, a.ds, a.hr, b.key, b.value, b.ds, b.hr;
27