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 74175b4 commit 950b21e
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -413,13 +413,15 @@ 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("! boolean logic operator") {
sql(
"""
|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).collect()
}

test("implement identity function using case statement") {
val actual = sql("SELECT (CASE key WHEN key THEN key END) FROM src")
Expand Down

0 comments on commit 950b21e

Please sign in to comment.