Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Drill, mail # dev - Review Request 14318: Implemented trigonometric functions as part of DRILL 219


Copy link to this message
-
Review Request 14318: Implemented trigonometric functions as part of DRILL 219
Yash Sharma 2013-09-24, 08:20

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14318/
-----------------------------------------------------------

Review request for drill.
Repository: drill-git
Description
-------

Implemented trigonometric functions as part of DRILL 219.
Updated the patch.
Added null checks for null inputs.
Diffs
-----

  common/src/main/java/org/apache/drill/common/expression/fn/MathFunctions.java ee3a099
  exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/MathFunctions.java 288760b
  exec/ref/src/main/java/org/apache/drill/exec/ref/eval/fn/MathEvaluators.java 347a4f3
  exec/ref/src/test/java/org/apache/drill/exec/ref/RunSimplePlan.java f4992e0
  exec/ref/src/test/resources/trigo_math.json PRE-CREATION

Diff: https://reviews.apache.org/r/14318/diff/
Testing
-------

Yes.
$ mvn test -Dtest=RunSimplePlan#mathTrigonometricPlan
{
  "tanh" : 1.0,
  "cosh" : 1.4524424832623713E13,
  "atan" : 1.5385494443596428,
  "asin" : "NaN",
  "cos" : 0.9147423578045313,
  "sin" : -0.404037645323065,
  "sinh" : 1.4524424832623713E13,
  "acos" : "NaN",
  "tan" : -0.441695568020698
}
 {
  "tanh" : 1.0,
  "cosh" : 1.0732178989295803E14,
  "atan" : 1.5405025668761214,
  "asin" : "NaN",
  "cos" : -0.013276747223059479,
  "sin" : 0.9999118601072672,
  "sinh" : 1.0732178989295803E14,
  "acos" : "NaN",
  "tan" : -75.31301480008509
}
 {
  "tanh" : 1.0,
  "cosh" : 1.0732178989295803E14,
  "atan" : 1.5405025668761214,
  "asin" : "NaN",
  "cos" : -0.013276747223059479,
  "sin" : 0.9999118601072672,
  "sinh" : 1.0732178989295803E14,
  "acos" : "NaN",
  "tan" : -75.31301480008509
}
 {
  "tanh" : 1.0,
  "cosh" : 2.9173087126372744E14,
  "atan" : 1.5413930385908916,
  "asin" : "NaN",
  "cos" : -0.8485702747846052,
  "sin" : 0.5290826861200238,
  "sinh" : 2.9173087126372744E14,
  "acos" : "NaN",
  "tan" : -0.6234989627162255
}
 {
  "tanh" : 1.0,
  "cosh" : 2.9173087126372744E14,
  "atan" : 1.5413930385908916,
  "asin" : "NaN",
  "cos" : -0.8485702747846052,
  "sin" : 0.5290826861200238,
  "sinh" : 2.9173087126372744E14,
  "acos" : "NaN",
  "tan" : -0.6234989627162255
}
 {
  "tanh" : "NaN",
  "cosh" : "NaN",
  "atan" : "NaN",
  "asin" : "NaN",
  "cos" : "NaN",
  "sin" : "NaN",
  "sinh" : "NaN",
  "acos" : "NaN",
  "tan" : "NaN"
}
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.389 sec - in org.apache.drill.exec.ref.RunSimplePlan

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.114s
[INFO] Finished at: Tue Sep 24 13:49:39 IST 2013
[INFO] Final Memory: 22M/52M
[INFO] ------------------------------------------------------------------------
Thanks,

Yash Sharma