Skip to content

Conversation

@petermaxlee
Copy link
Contributor

@petermaxlee petermaxlee commented Jul 8, 2016

What changes were proposed in this pull request?

This small patch modifies ExpressionEvalHelper. checkEvaluation to support comparing NaN values for floating point comparisons.

How was this patch tested?

This is a test harness change.

@petermaxlee
Copy link
Contributor Author

cc @cloud-fan

expected.asInstanceOf[Spread[Double]].isWithin(result)
case (result: MapData, expected: MapData) =>
result.keyArray() == expected.keyArray() && result.valueArray() == expected.valueArray()
case (result: Double, expected: Double) =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shoud we also handle isInfinite

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scala> Double.PositiveInfinity == Double.PositiveInfinity
res2: Boolean = true

it already works

@SparkQA
Copy link

SparkQA commented Jul 8, 2016

Test build #61955 has finished for PR 14103 at commit 0278dea.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@petermaxlee petermaxlee changed the title [SPARK-16436][SQL] checkEvaluation support NaN and RuntimeReplaceable [SPARK-16436][SQL] checkEvaluation should support NaN Jul 8, 2016
@SparkQA
Copy link

SparkQA commented Jul 8, 2016

Test build #61966 has finished for PR 14103 at commit ea0e91b.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@cloud-fan
Copy link
Contributor

thanks, merging to master!

@asfgit asfgit closed this in 8228b06 Jul 8, 2016
petermaxlee added a commit to petermaxlee/spark that referenced this pull request Jul 11, 2016
## What changes were proposed in this pull request?
This small patch modifies ExpressionEvalHelper. checkEvaluation to support comparing NaN values for floating point comparisons.

## How was this patch tested?
This is a test harness change.

Author: petermaxlee <[email protected]>

Closes apache#14103 from petermaxlee/SPARK-16436.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants