File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments