turboFei commented on issue #27151: [SPARK-26218][SQL][Follow up] Fix the corner case when casting float to Integer. URL: https://github.com/apache/spark/pull/27151#issuecomment-581728084 Thanks for your reminder. As mentioned above, > Thanks for your review. May we need close this PR. > Float is not an accurate type and its scale is only 8 bits, which means that 21234567890f == 21234567800f. > And the Math.floor(floatValue) operation would also cast this float value to a double value, so it's reasonable to compare with Math.floor(floatValue) with Int.MaxValue.toFloat. > > Thanks for your review again. I think I need close this PR. I will also try to find other solution.
---------------------------------------------------------------- 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]
