PageRenderTime 49ms CodeModel.GetById 23ms RepoModel.GetById 0ms 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
Possible License(s): Apache-2.0, BSD-3-Clause, JSON, CPL-1.0
  1. set hive.optimize.ppd=true;
  2. EXPLAIN
  3. SELECT *
  4. FROM srcpart a JOIN srcpart b
  5. ON a.key = b.key
  6. WHERE a.ds = '2008-04-08' AND
  7. b.ds = '2008-04-08' AND
  8. CASE a.key
  9. WHEN '27' THEN TRUE
  10. WHEN '38' THEN FALSE
  11. ELSE NULL
  12. END
  13. ORDER BY a.key, a.value, a.ds, a.hr, b.key, b.value, b.ds, b.hr;
  14. SELECT *
  15. FROM srcpart a JOIN srcpart b
  16. ON a.key = b.key
  17. WHERE a.ds = '2008-04-08' AND
  18. b.ds = '2008-04-08' AND
  19. CASE a.key
  20. WHEN '27' THEN TRUE
  21. WHEN '38' THEN FALSE
  22. ELSE NULL
  23. END
  24. ORDER BY a.key, a.value, a.ds, a.hr, b.key, b.value, b.ds, b.hr;