Skip to content

Commit 9395661

Browse files
committed
remove unnecessary condition
1 parent 2d4f6e7 commit 9395661

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)