Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upInternal error: length(irows)!=length(o__) #3062
Comments
|
A minimal example is set.seed(123)
n <- 10
dt <- data.table(group = rbinom(n, 5, 0.5), x = rnorm(n), flag = rbinom(n, 1, 0.9))
dt[flag == 1 & group == 1, 1] # (1)
dt[flag == 1, 1, keyby = group] # (2)If the indices are removed using It looks like the problem lies at using existing index in |
When I upgrade data.table to the latest release (1.11.6) from 1.11.4, the following code produces errors:
(2)results in the following error:But if
(1)is not run,(2)will work.The actual code in production ends up in segfault:
The code in production is reduced to the form like above. I cannot reproduce the segfault with simple code yet so I'm not sure if they are caused by the same bug. But in my production, when code in the form of
(1)is skipped before(2)is executed,(2)will work just like the example above.My session info:
The error can be reproduced on both R 3.4 and 3.5. I guess it is not caused by ALTREP.