You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ma...@apache.org on 2014/12/12 07:48:17 UTC

spark git commit: [SQL] Remove unnecessary case in HiveContext.toHiveString

Repository: spark
Updated Branches:
  refs/heads/master 334480362 -> d8cf67858


[SQL] Remove unnecessary case in HiveContext.toHiveString

a follow up of #3547
/cc marmbrus

Author: scwf <wa...@huawei.com>

Closes #3563 from scwf/rnc and squashes the following commits:

9395661 [scwf] remove unnecessary condition


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/d8cf6785
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/d8cf6785
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/d8cf6785

Branch: refs/heads/master
Commit: d8cf67858988bed287c0125095729f7f808aabad
Parents: 3344803
Author: scwf <wa...@huawei.com>
Authored: Thu Dec 11 22:48:03 2014 -0800
Committer: Michael Armbrust <mi...@databricks.com>
Committed: Thu Dec 11 22:48:03 2014 -0800

----------------------------------------------------------------------
 .../src/main/scala/org/apache/spark/sql/hive/HiveContext.scala   | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/d8cf6785/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala
----------------------------------------------------------------------
diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala
index 34fc21e..6008e46 100644
--- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala
+++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala
@@ -414,9 +414,7 @@ object HiveContext {
     case (d: Date, DateType) => new DateWritable(d).toString
     case (t: Timestamp, TimestampType) => new TimestampWritable(t).toString
     case (bin: Array[Byte], BinaryType) => new String(bin, "UTF-8")
-    case (decimal: Decimal, DecimalType()) =>  // Hive strips trailing zeros so use its toString
-      HiveShim.createDecimal(decimal.toBigDecimal.underlying()).toString
-    case (decimal: BigDecimal, DecimalType()) =>
+    case (decimal: BigDecimal, DecimalType()) => // Hive strips trailing zeros so use its toString
       HiveShim.createDecimal(decimal.underlying()).toString
     case (other, tpe) if primitiveTypes contains tpe => other.toString
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org