aboutsummaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorLiang-Chi Hsieh <viirya@gmail.com>2015-05-27 18:51:36 -0700
committerReynold Xin <rxin@databricks.com>2015-05-27 18:51:36 -0700
commita1e092eae57172909ff2af06d8b461742595734c (patch)
treeb749b72655bc6def1314e7810cc01dd0c57d6793 /sql
parentdb3fd054f240c7e38aba0732e471df65cd14011a (diff)
downloadspark-a1e092eae57172909ff2af06d8b461742595734c.tar.gz
spark-a1e092eae57172909ff2af06d8b461742595734c.tar.bz2
spark-a1e092eae57172909ff2af06d8b461742595734c.zip
[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.
Diffstat (limited to 'sql')
-rw-r--r--sql/core/src/main/scala/org/apache/spark/sql/jdbc/JDBCRDD.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/jdbc/JDBCRDD.scala b/sql/core/src/main/scala/org/apache/spark/sql/jdbc/JDBCRDD.scala
index 244bd3ebfe..88f1b02549 100644
--- a/sql/core/src/main/scala/org/apache/spark/sql/jdbc/JDBCRDD.scala
+++ b/sql/core/src/main/scala/org/apache/spark/sql/jdbc/JDBCRDD.scala
@@ -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