diff options
author | scwf <wangfei1@huawei.com> | 2014-12-11 22:48:03 -0800 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2014-12-11 22:48:03 -0800 |
commit | d8cf67858988bed287c0125095729f7f808aabad (patch) | |
tree | 37f358325543ae29b7d76b00688d6598780f5d35 /sql | |
parent | 334480362b3a133c2fb1e9af898930fe76d7a163 (diff) | |
download | spark-d8cf67858988bed287c0125095729f7f808aabad.tar.gz spark-d8cf67858988bed287c0125095729f7f808aabad.tar.bz2 spark-d8cf67858988bed287c0125095729f7f808aabad.zip |
[SQL] Remove unnecessary case in HiveContext.toHiveString
a follow up of #3547
/cc marmbrus
Author: scwf <wangfei1@huawei.com>
Closes #3563 from scwf/rnc and squashes the following commits:
9395661 [scwf] remove unnecessary condition
Diffstat (limited to 'sql')
-rw-r--r-- | sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala | 4 |
1 files changed, 1 insertions, 3 deletions
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 34fc21e61f..6008e46fef 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 } |