Github user dongjoon-hyun commented on the pull request:
https://github.com/apache/spark/pull/11868#issuecomment-199982128
Oh, I see what is the point here now. @rxin , may I explain a little bit
more?
Mathematically, `NaN` equality is defined `false`. The followings are all
**false** in Scala (and Java).
* row_a(1).getDouble(0) == row_a(1).getDouble(0)
* row_b(1).getFloat(0) == row_b(1).getFloat(0)
* row_a(1).getDouble(0) == row_b(1).getFloat(0)
* Double.NaN == Double.NaN
* Float.NaN == Float.NaN
* Double.NaN == Float.NaN
However, Spark `Row` on master branch already returns **true** for the
followings.
* Row(Double.NaN) == Row(Double.NaN)
* Row(Float.NaN) == Row(Float.NaN)
As you guess easily, the followings are still **false**.
* Row(Float.NaN).getFloat(0) == Row(Float.NaN).getFloat(0)
* Row(Double.NaN).getDouble(0) == Row(Double.NaN).getDouble(0)
---
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]