Data.table: by=.EACHI reaches internal error when i is 0 rows dt

Created on 8 Apr 2020  路  3Comments  路  Source: Rdatatable/data.table

d0 = data.table(id=integer(), n=integer())
d2 = data.table(id=1:2)
d2[d0, i.n, on="id", by=.EACHI]
#Error in `[.data.table`(d2, d0, i.n, on = "id", by = .EACHI) : 
#  Internal error memrecycle: sourceStart=0 sourceLen=1 length(source)=0
dev joins regression

Most helpful comment

If it is a regression then we definitely should try to put it into coming release.
Thanks for bringing that up.

# 1.12.8
d0 = data.table(id=integer(), n=integer())
d2 = data.table(id=1:2)
d2[d0, i.n, on="id", by=.EACHI]
#Empty data.table (0 rows and 2 cols): id,i.n

All 3 comments

just ran into this when testing against data.table 1.12.9 IN DEVELOPMENT built 2020-06-05 07:47:47 UTC; root using 4 threads (see ?getDTthreads). Latest news: r-datatable.com

This is breaking existing code on my end. I can't tell from the description if this is a regression bug or a an intended change in functionality. If this is a regression bug, would you consider making it part of the 1.12.9 release?

If it is a regression then we definitely should try to put it into coming release.
Thanks for bringing that up.

# 1.12.8
d0 = data.table(id=integer(), n=integer())
d2 = data.table(id=1:2)
d2[d0, i.n, on="id", by=.EACHI]
#Empty data.table (0 rows and 2 cols): id,i.n

thank you. you folks are awesome

Was this page helpful?
0 / 5 - 0 ratings