Skip to content

Commit d8cf678

Browse files
scwfmarmbrus
authored andcommitted
[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
1 parent 3344803 commit d8cf678

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,9 +414,7 @@ object HiveContext {
414414
case (d: Date, DateType) => new DateWritable(d).toString
415415
case (t: Timestamp, TimestampType) => new TimestampWritable(t).toString
416416
case (bin: Array[Byte], BinaryType) => new String(bin, "UTF-8")
417-
case (decimal: Decimal, DecimalType()) => // Hive strips trailing zeros so use its toString
418-
HiveShim.createDecimal(decimal.toBigDecimal.underlying()).toString
419-
case (decimal: BigDecimal, DecimalType()) =>
417+
case (decimal: BigDecimal, DecimalType()) => // Hive strips trailing zeros so use its toString
420418
HiveShim.createDecimal(decimal.underlying()).toString
421419
case (other, tpe) if primitiveTypes contains tpe => other.toString
422420
}

0 commit comments

Comments
 (0)