datafusion icon indicating copy to clipboard operation
datafusion copied to clipboard

Make Eq with negative float zero compat with other engines

Open kazuyukitanimura opened this issue 1 year ago • 1 comments

Describe the bug

DF returns false below and is not compliant with major engines:

DataFusion CLI v39.0.0
> select 0.0 == -0.0;
+--------------------------+
| Float64(0) = Float64(-0) |
+--------------------------+
| false                    |
+--------------------------+

Similar issue #11051

To Reproduce

No response

Expected behavior

No response

Additional context

No response

kazuyukitanimura avatar Jun 24 '24 20:06 kazuyukitanimura

Isn't this done in Arrow? Because Binary Eq calls arrow::compute::kernels::cmp::eq

Screenshot 2024-06-27 at 00 46 46

So I think we should do exactly what the docs say and normalize zeros?

LorrensP-2158466 avatar Jun 26 '24 22:06 LorrensP-2158466