Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edge case bug in GForce #1994

Closed
arunsrinivasan opened this issue Jan 19, 2017 · 0 comments · Fixed by #5109
Closed

Edge case bug in GForce #1994

arunsrinivasan opened this issue Jan 19, 2017 · 0 comments · Fixed by #5109
Labels
bug GForce issues relating to optimized grouping calculations (GForce) segfault
Milestone

Comments

@arunsrinivasan
Copy link
Member

require(data.table)
dt <- data.table(a=1, b=2)[0] # empty table
dt[rep(NA_integer_, 10), mean(a), by=list(vv=1:10)] # subset with NA_integer_

This results in segfault.. and would result in the same with median, min, max etc. Since they all depend on the input table, as opposed to gN() (equivalent of .N), for example.

Not sure, but I think this happens because irows is non-empty (all NAs), but x (input table) is. And I think this difference is not taken care of in this line.

@MichaelChirico MichaelChirico added the GForce issues relating to optimized grouping calculations (GForce) label Feb 25, 2019
@mattdowle mattdowle added this to the 1.14.1 milestone Aug 23, 2021
@jangorecki jangorecki modified the milestones: 1.14.9, 1.15.0 Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug GForce issues relating to optimized grouping calculations (GForce) segfault
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants