Skip to content

Commit

Permalink
[SPARK-28133][SQL] Adding inverse hyperbolic functions in SQL
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Zhang committed Jul 12, 2019
1 parent 18dcf6d commit bd4e7ff
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -601,9 +601,9 @@ case class Asinh(child: Expression)
case _ => math.log(x + math.sqrt(x * x + 1.0)) }, "ASINH") {
override def doGenCode(ctx: CodegenContext, ev: ExprCode): ExprCode = {
defineCodeGen(ctx, ev, c =>
s"""${ev.value} = \"$c\" == \"Double.NEGATIVE_INFINITY\" ? """ +
s"java.lang.Double.NEGATIVE_INFINITY : " +
s"java.lang.Math.log($c + java.lang.Math.sqrt($c * $c + 1.0));")
s"${ev.value} = $c == Double.NEGATIVE_INFINITY ?" +
s"java.lang.Double.NEGATIVE_INFINITY : " +
s"java.lang.Math.log($c + java.lang.Math.sqrt($c * $c + 1.0));")
}
}

Expand Down

0 comments on commit bd4e7ff

Please sign in to comment.