Skip to content

Commit

Permalink
Added more test cases for select with limit.
Browse files Browse the repository at this point in the history
  • Loading branch information
rxin committed Jul 17, 2013
1 parent e505770 commit 005ce06
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/test/scala/shark/SQLSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,13 @@ class SQLSuite extends FunSuite with BeforeAndAfterAll {
}

test("limit") {
assert(sc.sql("select * from test limit 10").length == 10)
assert(sc.sql("select * from test limit 501").length == 500)
assert(sc.sql("select * from test limit 10").length === 10)
assert(sc.sql("select * from test limit 501").length === 500)
sc.sql("drop table if exists test_limit0")
assert(sc.sql("select * from test limit 0").length === 0)
assert(sc.sql("create table test_limit0 as select * from test limit 0").length === 0)
assert(sc.sql("select * from test_limit0 limit 0").length === 0)
assert(sc.sql("select * from test_limit0 limit 1").length === 0)
}

//////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 005ce06

Please sign in to comment.