Skip to content

Commit

Permalink
Add unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Apr 29, 2015
1 parent a509e19 commit 49acbf9
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import java.sql.DriverManager
import java.util.{Calendar, GregorianCalendar, Properties}

import org.apache.spark.sql.test._
import org.apache.spark.sql.types._
import org.h2.jdbc.JdbcSQLException
import org.scalatest.{FunSuite, BeforeAndAfter}
import TestSQLContext._
Expand Down Expand Up @@ -262,6 +263,7 @@ class JDBCSuite extends FunSuite with BeforeAndAfter {
assert(rows(0).getDouble(1) === 1.00000011920928955) // Yes, I meant ==.
assert(rows(0).getAs[BigDecimal](2)
.equals(new BigDecimal("123456789012345.54321543215432100000")))
assert(rows(0).schema.fields(2).dataType === DecimalType(40, 20))
}

test("SQL query as table name") {
Expand Down

0 comments on commit 49acbf9

Please sign in to comment.