Github user liancheng commented on the pull request:
https://github.com/apache/spark/pull/8705#issuecomment-140133705
Found two possible sources of flakiness:
1. For double and float, `NaN == NaN` is always `false`
2. `checkAnswer` doesn't handle `Map[K, V]` properly. For example:
```
scala> Map(1 -> 2, 2 -> 1).toString
res0: String = Map(1 -> 2, 2 -> 1)
scala> Map(2 -> 1, 1 -> 2).toString
res1: String = Map(2 -> 1, 1 -> 2)
```
We can't rely on `toString` to compare `Map` instances.
Need to update `checkAnswer` to special case `NaN` and `Map[K, V]`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]