Github user dongjoon-hyun commented on the pull request:
https://github.com/apache/spark/pull/11868#issuecomment-212020852
Hi, @JoshRosen .
Could you take a look at this PR about Row(Double.NaN) == Row(Float.NaN)
for a second when you have some time today? I'm going to close this PR and JIRA
(as WontFix) since it's stale and Spark works fine without this. However,
before closing this, I really appreciate if you give some opinion about what
the original intention was.
According to the initial commit in `RowSuite.scala`, `Row` class is
designed(tested) to return true for 'NaN' equality test since 'NaN' is defined
a normal value. So, I thought Double.NaN also needs to be equal to Float.NaN
and made this PR. It's not interesting feature, just an attempt to complete
`Row`-level NaN operations.
```
test("float NaN == NaN") {
val r1 = Row(Float.NaN)
val r2 = Row(Float.NaN)
assert(r1 === r2)
}
test("double NaN == NaN") {
val r1 = Row(Double.NaN)
val r2 = Row(Double.NaN)
assert(r1 === r2)
}
```
---
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]