Skip to content
Snippets Groups Projects
Commit 9b091019 authored by Yuming Wang's avatar Yuming Wang Committed by Xiao Li
Browse files

[SPARK-20751][SQL][FOLLOWUP] Add cot test in MathExpressionsSuite

## What changes were proposed in this pull request?

Add cot test in MathExpressionsSuite as https://github.com/apache/spark/pull/17999#issuecomment-302832794.

## How was this patch tested?

unit tests

Author: Yuming Wang <wgyumg@gmail.com>

Closes #18039 from wangyum/SPARK-20751-test.
parent df64fa79
No related branches found
No related tags found
No related merge requests found
......@@ -219,6 +219,12 @@ class MathExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper {
checkConsistencyBetweenInterpretedAndCodegen(Tan, DoubleType)
}
test("cot") {
def f: (Double) => Double = (x: Double) => 1 / math.tan(x)
testUnary(Cot, f)
checkConsistencyBetweenInterpretedAndCodegen(Cot, DoubleType)
}
test("atan") {
testUnary(Atan, math.atan)
checkConsistencyBetweenInterpretedAndCodegen(Atan, DoubleType)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment