mgaido91 commented on code in PR #54676:
URL: https://github.com/apache/spark/pull/54676#discussion_r2919696724
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/mathExpressions.scala:
##########
@@ -418,10 +418,28 @@ case class Cosh(child: Expression) extends
UnaryMathExpression(math.cosh, "COSH"
since = "3.0.0",
group = "math_funcs")
case class Acosh(child: Expression)
- extends UnaryMathExpression((x: Double) => StrictMath.log(x + math.sqrt(x *
x - 1.0)), "ACOSH") {
+ extends UnaryMathExpression((x: Double) => x match {
Review Comment:
@HyukjinKwon thanks for taking a look at this. I do not see why this should
go under the ANSI flag. The flag controls whether to throw an exception in case
of overflow or return null. In this case, we just avoid the overflow and return
the correct value instead.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]