The reason is that ==
is not a test of equality used in joins.
The test of equality is isequal
:
julia> isequal(0.0, -0.0)
false
This difference is exactly the reason why joining on -0.0
is by default disallowed as the result could confuse the user.
Note that the same is for e.g. Set
or Dict
:
julia> Set([0.0, -0.0])
Set{Float64} with 2 elements:
0.0
-0.0
julia> Dict(0.0=>1, -0.0=>2)
Dict{Float64, Int64} with 2 entries:
0.0 => 1
-0.0 => 2