Skip to content

Commit

Permalink
amend a new call site for isReallyReal
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelChirico committed Dec 2, 2024
1 parent c81a1f7 commit dfdcd9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/bmerge.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mergeType = function(x) {
ans = typeof(x)
if (ans=="integer") { if (is.factor(x)) ans = "factor" }
else if (ans=="double") { if (inherits(x, "integer64")) ans = "integer64" }
# do not call isReallyReal(x) yet because i) if both types are double we don't need to coerce even if one or both sides
# do not call isRealReallyInt*(x) yet because i) if both types are double we don't need to coerce even if one or both sides
# are int-as-double, and ii) to save calling it until we really need it
ans
}
Expand Down Expand Up @@ -119,7 +119,7 @@ bmerge = function(i, x, icols, xcols, roll, rollends, nomatch, mult, ops, verbos
if (length(ic_idx)>1L) {
xc_idx = xcols[ic_idx]
for (xb in xc_idx[which(vapply_1c(.shallow(x, xc_idx), mergeType) == "double")]) {
if (isReallyReal(x[[xb]])) {
if (isRealReallyInt32(x[[xb]])) {
coerce_x = FALSE
break
}
Expand Down

0 comments on commit dfdcd9b

Please sign in to comment.