MaxGekk commented on a change in pull request #26799: [WIP][SPARK-30170][SQL]
Eliminate compilation warnings: part 1
URL: https://github.com/apache/spark/pull/26799#discussion_r355214806
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/types/FloatType.scala
##########
@@ -78,8 +78,12 @@ case object FloatType extends FloatType {
}
trait FloatAsIfIntegral extends FloatIsConflicted with Integral[Float] {
- def quot(x: Float, y: Float): Float = (BigDecimal(x) quot
BigDecimal(y)).floatValue
- def rem(x: Float, y: Float): Float = (BigDecimal(x) remainder
BigDecimal(y)).floatValue
+ def quot(x: Float, y: Float): Float = {
Review comment:
```
Warning:Warning:line (81)method apply in object BigDecimal is deprecated
(since 2.11.0): The default conversion from Float may not do what you want. Use
BigDecimal.decimal for a String representation, or explicitly convert the Float
with .toDouble.
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]