You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by rx...@apache.org on 2015/05/28 03:51:39 UTC
spark git commit: [SPARK-7897][SQL] Use DecimalType to represent
unsigned bigint in JDBCRDD
Repository: spark
Updated Branches:
refs/heads/master db3fd054f -> a1e092eae
[SPARK-7897][SQL] Use DecimalType to represent unsigned bigint in JDBCRDD
JIRA: https://issues.apache.org/jira/browse/SPARK-7897
Author: Liang-Chi Hsieh <vi...@gmail.com>
Closes #6438 from viirya/jdbc_unsigned_bigint and squashes the following commits:
ccb3c3f [Liang-Chi Hsieh] Use DecimalType to represent unsigned bigint.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/a1e092ea
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/a1e092ea
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/a1e092ea
Branch: refs/heads/master
Commit: a1e092eae57172909ff2af06d8b461742595734c
Parents: db3fd05
Author: Liang-Chi Hsieh <vi...@gmail.com>
Authored: Wed May 27 18:51:36 2015 -0700
Committer: Reynold Xin <rx...@databricks.com>
Committed: Wed May 27 18:51:36 2015 -0700
----------------------------------------------------------------------
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JDBCRDD.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/a1e092ea/sql/core/src/main/scala/org/apache/spark/sql/jdbc/JDBCRDD.scala
----------------------------------------------------------------------
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 244bd3e..88f1b02 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
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org