Skip to content

Commit

Permalink
Update HiveQuerySuite.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
YanTangZhai committed Dec 3, 2014
1 parent 92242c7 commit 74175b4
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,14 @@ class HiveQuerySuite extends HiveComparisonTest with BeforeAndAfter {
createQueryTest("select null from table",
"SELECT null FROM src LIMIT 1")

createQueryTest("! boolean logic operator",
"""
|SELECT a FROM (
| SELECT 1 AS a FROM src LIMIT 1 UNION ALL
| SELECT 2 AS a FROM src LIMIT 1) table
|WHERE !(a>1)
""".stripMargin)

test("implement identity function using case statement") {
val actual = sql("SELECT (CASE key WHEN key THEN key END) FROM src")
.map { case Row(i: Int) => i }
Expand Down

0 comments on commit 74175b4

Please sign in to comment.