You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
} else stopf("Incompatible join types: %s is type integer64 but %s is type double and contains fractions", nm[2L], nm[1L])
The "and contains fractions" part really threw off a debugging effort -- typically when that comes up in my experience, it's because the "integer64" class got dropped and we wound up trying to join (integer64, unclassed-integer64-which-is-tiny-double).
Observe:
library(bit64)
i64_val=.Machine$integer.max+1DT1= data.table(id= as.integer64(i64_val))
DT2= data.table(id=i64_val)
DT1[DT2, on='id']
# Error in bmerge(i, x, leftcols, rightcols, roll, rollends, nomatch, mult, : # Incompatible join types: x.id is type integer64 but i.id is type double and contains fractions
But there's no fraction! It's just that i64_val is not integer-representable.
At a minimum we should correct the error message. But even better would be to recognize that we are perfectly capable of joining these two tables if we coerce to integer64.
(actually, it's a bit more complicated than that in general -- we need to ensure that the two values can be represented in the same class, since there are integer64 that cannot be represented in double and vice versa)
The text was updated successfully, but these errors were encountered:
data.table/R/bmerge.R
Line 98 in 546259d
The "and contains fractions" part really threw off a debugging effort -- typically when that comes up in my experience, it's because the "integer64" class got dropped and we wound up trying to join (integer64, unclassed-integer64-which-is-tiny-double).
Observe:
But there's no fraction! It's just that
i64_val
is not integer-representable.At a minimum we should correct the error message. But even better would be to recognize that we are perfectly capable of joining these two tables if we coerce to integer64.
(actually, it's a bit more complicated than that in general -- we need to ensure that the two values can be represented in the same class, since there are integer64 that cannot be represented in double and vice versa)
The text was updated successfully, but these errors were encountered: