BUG: Merges erroneously match integer join keys between int64
and uint64
when using values >= 2**53
#56367
Open
3 tasks done
Labels
Bug
Dtype Conversions
Unexpected or buggy dtype conversions
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
The merge between the left and right frames produces a non-empty result, claiming that$2^{53} = 2^{53} + 1$ .
My guess is that somewhere in the guts of the merge, to perform the matching between the left$2^{53}$ .
int64
and rightuint64
columns, the keys are converted tofloat64
which is lossy abovefloat(2**53) + 1 == float(2**53)
isTrue
.Expected Behavior
I would expect an empty result, since the left and right key columns do not have matching keys.
Installed Versions
The text was updated successfully, but these errors were encountered: