You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/12/11 14:21:06 UTC

[GitHub] [spark] srowen commented on a change in pull request #26799: [SPARK-30170][SQL][MLLIB] Eliminate compilation warnings: part 1

srowen commented on a change in pull request #26799: [SPARK-30170][SQL][MLLIB] Eliminate compilation warnings: part 1
URL: https://github.com/apache/spark/pull/26799#discussion_r356624961
 
 

 ##########
 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:
   I think we can leave it, just because this is the implementation:
   ```
     def apply(x: Float): BigDecimal = apply(x.toDouble)
   ```
   I am not sure why it's deprecated, or what the 'default conversion' issue is. I understand the issue with double/float not being exact representations, but then why is `apply(Double)` not deprecated? 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org