Skip to content

Commit

Permalink
Explicitly indicate sqrt value sequence.
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Jun 18, 2015
1 parent 699f48b commit d23e79e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,9 @@ class MathFunctionsSuite extends SparkFunSuite with ExpressionEvalHelper {
testUnary(Sqrt, math.sqrt, (0 to 20).map(_ * 0.1))
testUnary(Sqrt, math.sqrt, (-5 to -1).map(_ * 1.0), expectNull = true)

val inputSequence = (1 to (1<<10) by 50).map(_ * (1<<5))
val expectedResults = inputSequence.map(l => math.sqrt(l.toDouble))
val rowSequence = inputSequence.map(l => create_row(l.toDouble))
val inputSequence = Seq(4.5, 10.10, 20.55, 36.0, 57.0, 61.7, 77.0, 81.0, 98.9)
val expectedResults = inputSequence.map(l => math.sqrt(l))
val rowSequence = inputSequence.map(l => create_row(l))
val d = 'a.double.at(0)

for ((row, expected) <- rowSequence zip expectedResults) {
Expand Down

0 comments on commit d23e79e

Please sign in to comment.