Skip to content

Commit c0c8390

Browse files
committed
review round #3
1 parent 2e4c333 commit c0c8390

File tree

1 file changed

+2
-5
lines changed
  • sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions

1 file changed

+2
-5
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/hash.scala

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -748,17 +748,14 @@ object HiveHashFunction extends InterpretedHashFunction {
748748

749749
// Mimics normalization done for decimals in Hive at HiveDecimalV1.normalize()
750750
def normalizeDecimal(input: BigDecimal, allowRounding: Boolean): BigDecimal = {
751-
if (input == null) {
752-
return null
753-
}
751+
if (input == null) return null
754752

755753
def trimDecimal(input: BigDecimal) = {
756754
var result = input
757755
if (result.compareTo(BigDecimal.ZERO) == 0) {
758756
// Special case for 0, because java doesn't strip zeros correctly on that number.
759757
result = BigDecimal.ZERO
760-
}
761-
else {
758+
} else {
762759
result = result.stripTrailingZeros
763760
if (result.scale < 0) {
764761
// no negative scale decimals

0 commit comments

Comments
 (0)