[SPARK-7897][SQL] Use DecimalType to represent unsigned bigint in JDBCRDD

JIRA: https://issues.apache.org/jira/browse/SPARK-7897

Author: Liang-Chi Hsieh <viirya@gmail.com>

Closes #6438 from viirya/jdbc_unsigned_bigint and squashes the following commits:

ccb3c3f [Liang-Chi Hsieh] Use DecimalType to represent unsigned bigint.

(cherry picked from commit a1e092eae5)
Signed-off-by: Reynold Xin <rxin@databricks.com>
This commit is contained in:
Liang-Chi Hsieh 2015-05-27 18:51:36 -07:00 committed by Reynold Xin
parent e07b71560c
commit b4ecbce65c

View file

@ -53,7 +53,7 @@ private[sql] object JDBCRDD extends Logging {
signed: Boolean): DataType = {
val answer = sqlType match {
case java.sql.Types.ARRAY => null
case java.sql.Types.BIGINT => LongType
case java.sql.Types.BIGINT => if (signed) { LongType } else { DecimalType.Unlimited }
case java.sql.Types.BINARY => BinaryType
case java.sql.Types.BIT => BooleanType // @see JdbcDialect for quirks
case java.sql.Types.BLOB => BinaryType