sarutak opened a new pull request, #7378:
URL: https://github.com/apache/arrow-datafusion/pull/7378
## Which issue does this PR close?
Closes #7377
## Rationale for this change
This PR fixes an issue that `'NaN'::double in ('NaN'::double)` is evaluated
as `false`, which is inconsistent with the result of `'NaN'::double =
'NaN'::double`.
## What changes are included in this PR?
The root cause is that equality is evaluated using `PartialEq::eq`. So the
fix is using `to_bits` for equality check for float values like as
`ScalarValue::Float64` does.
NOTE: This issue doesn't happen when `Simplifier` simplifies `IN` expr like
```
a IN (x, y, z) -> a = x OR a = y OR a = z
```
## Are these changes tested?
Modified an existing test.
## Are there any user-facing changes?
Yes, but this change is for correctness.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]