This might be by design, but I couldn't find an explicit mention of it in NEWS, issue reports or elsewhere.
We're trying to upgrade data.table from 1.11.8 to 1.13.6, and some of our tests break on code that simplifies to this:
d <- list()
d[[1]] <- data.frame(a=1, b=I(2))
d[[2]] <- data.frame(a=3, b=4)
rbindlist(d, fill=TRUE)
The rbindlist call succeeds in 1.11.8, but in 1.13.6 fails with:
Error in rbindlist(d, fill = TRUE) :
Class attribute on column 2 of item 2 does not match with column 2 of item 1.
We suspect it's a regression, as AsIs class should not account as a class change - just inhibit coercion.
Edit: turns out this surfaced due to an R3.4 -> R4.0.3 upgrade, not a data.table upgrade. Still, suggest it be considered for fixing.
# Output of sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS
Matrix products: default
BLAS: /mnt/public/istra/apps/R/R-4.0.3.mkl/lib/libRblas.so
LAPACK: /mnt/public/istra/apps/R/R-4.0.3.mkl/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=C LC_COLLATE=C LC_MONETARY=C LC_MESSAGES=C
[7] LC_PAPER=C LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=C LC_IDENTIFICATION=C
attached base packages:
[1] datasets utils stats graphics grDevices methods base
...
This might be by design, but I couldn't find an explicit mention of it in
NEWS, issue reports or elsewhere.We're trying to upgrade
data.tablefrom 1.11.8 to 1.13.6, and some of our tests break on code that simplifies to this:The
rbindlistcall succeeds in 1.11.8, but in 1.13.6 fails with:We suspect it's a regression, as
AsIsclass should not account as a class change - just inhibit coercion.Edit: turns out this surfaced due to an R3.4 -> R4.0.3 upgrade, not a data.table upgrade. Still, suggest it be considered for fixing.
#Output of sessionInfo()