Skip to content

segfault combining on= with by=.EACHI and mult= #1271

@arunsrinivasan

Description

@arunsrinivasan
require(data.table)
set.seed(1L)
dt = data.table(a=c(1,1,2), b=sample(10,3), c=sample(10,3))
#    a b  c
#1: 1 3 10
#2: 1 4  2
#3: 2 5  8
dt[.(a=unique(a)), c := if (c-b > 0L) b, on="a", by=.EACHI] # warning (rightfully so)
dt[.(a=unique(a)), c := if (c-b > 0L) b, on="a", by=.EACHI, mult="first"] # <~~~ segfault
dt[.(a=unique(a)), c := if (c-b > 0L) b, on="a", by=.EACHI, mult="last"] # <~~~ segfault

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions