File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
sql/core/src/test/scala/org/apache/spark/sql/jdbc Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import java.sql.DriverManager
2222import java .util .{Calendar , GregorianCalendar , Properties }
2323
2424import org .apache .spark .sql .test ._
25+ import org .apache .spark .sql .types ._
2526import org .h2 .jdbc .JdbcSQLException
2627import org .scalatest .{FunSuite , BeforeAndAfter }
2728import TestSQLContext ._
@@ -262,6 +263,7 @@ class JDBCSuite extends FunSuite with BeforeAndAfter {
262263 assert(rows(0 ).getDouble(1 ) === 1.00000011920928955 ) // Yes, I meant ==.
263264 assert(rows(0 ).getAs[BigDecimal ](2 )
264265 .equals(new BigDecimal (" 123456789012345.54321543215432100000" )))
266+ assert(rows(0 ).schema.fields(2 ).dataType === DecimalType (40 , 20 ))
265267 }
266268
267269 test(" SQL query as table name" ) {
You can’t perform that action at this time.
0 commit comments