Repository: spark
Updated Branches:
  refs/heads/master df64fa79d -> 9b0910193


[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 <wgy...@gmail.com>

Closes #18039 from wangyum/SPARK-20751-test.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/9b091019
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/9b091019
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/9b091019

Branch: refs/heads/master
Commit: 9b09101938399a3490c3c9bde9e5f07031140fdf
Parents: df64fa7
Author: Yuming Wang <wgy...@gmail.com>
Authored: Mon May 22 13:05:05 2017 -0700
Committer: Xiao Li <gatorsm...@gmail.com>
Committed: Mon May 22 13:05:05 2017 -0700

----------------------------------------------------------------------
 .../spark/sql/catalyst/expressions/MathExpressionsSuite.scala  | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/9b091019/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/MathExpressionsSuite.scala
----------------------------------------------------------------------
diff --git 
a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/MathExpressionsSuite.scala
 
b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/MathExpressionsSuite.scala
index 1555dd1..8ed7a82 100644
--- 
a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/MathExpressionsSuite.scala
+++ 
b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/MathExpressionsSuite.scala
@@ -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)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to