Skip to content

Commit

Permalink
[SPARK-38100][SQL] Remove unused private method in Decimal
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
There is an unused `private` method `overflowException` in `org.apache.spark.sql.types.Decimal`, this method add by SPARK-28741 and  the relevant invocations are replaced by `QueryExecutionErrors.castingCauseOverflowError` directly after SPARK-35060. So this pr remove this unused method.

### Why are the changes needed?
Remove unused method.

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Pass GA

Closes apache#35392 from LuciferYang/SPARK-38100.

Authored-by: yangjie01 <yangjie01@baidu.com>
Signed-off-by: huaxingao <huaxin_gao@apple.com>
(cherry picked from commit 7a613ec)
Signed-off-by: huaxingao <huaxin_gao@apple.com>
(cherry picked from commit 4cd3fd3)
  • Loading branch information
LuciferYang authored and huaxingao committed Feb 14, 2022
1 parent c38691a commit 5e4ac25
Showing 1 changed file with 0 additions and 3 deletions.
Expand Up @@ -251,9 +251,6 @@ final class Decimal extends Ordered[Decimal] with Serializable {

def toByte: Byte = toLong.toByte

private def overflowException(dataType: String) =
throw QueryExecutionErrors.castingCauseOverflowError(this, dataType)

/**
* @return the Byte value that is equal to the rounded decimal.
* @throws ArithmeticException if the decimal is too big to fit in Byte type.
Expand Down

0 comments on commit 5e4ac25

Please sign in to comment.