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

crash on rolling join with keyed tables on=permutation of keys #1650

Closed
franknarf1 opened this issue Apr 16, 2016 · 1 comment
Closed

crash on rolling join with keyed tables on=permutation of keys #1650

franknarf1 opened this issue Apr 16, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@franknarf1
Copy link
Contributor

franknarf1 commented Apr 16, 2016

I found this on SO

library(data.table)
dt <- data.table(Date = as.Date(c("2015-12-29", "2015-12-29", "2015-12-29", "2015-12-29", "2016-01-30", "2016-01    -30", "2016-01-30", "2016-01-30", "2016-02-29", "2016-02-29", "2016-02-29", "2016-02-29", "2016-03-26", "2016-03-26", "2016-03-26", "2016-03-26")), 
                 ID = c("A", "B", "C", "D", "A", "B", "C", "D", "A", "B", "C", "D", "A", "B", "C", "D"), 
                 Value = c("A201512", "B201512", "C201512", "D201512", "A201601", "B201601", "C201601", "D201601", "A201602", "B201602", "C201602", "D201602", "A201603", "B201603", "C201603", "D201603"), key = c('Date', 'ID'))
dtes <- data.table(Date=as.Date(c("2015-12-31", "2016-01-31", "2016-02-29", "2016-03-31")), key="Date")
dte <- CJ(Date=dtes$Date, ID=unique(dt$ID))
dt[dte, on=c("ID","Date"), roll=TRUE]
#
# *** caught segfault ***
#address 0xfffffffc02c53c48, cause 'memory not mapped'
#
#Traceback:
#1: bmerge(i, x, leftcols, rightcols, io, xo, roll, rollends, nomatch,     mult, ops, nqgrp, nqmaxgrp, verbose = verbose)
#2: `[.data.table`(dt, dte, on = c("ID", "Date"), roll = TRUE)
#3: dt[dte, on = c("ID", "Date"), roll = TRUE]

I'm not sure if my title covers the reason behind it...

@franknarf1 franknarf1 changed the title crash on merging keyed tables on=permutation of keys crash on rolling join with keyed tables on=permutation of keys Apr 16, 2016
@jangorecki jangorecki added the bug label Apr 16, 2016
@arunsrinivasan arunsrinivasan added this to the v1.9.8 milestone Apr 16, 2016
@arunsrinivasan arunsrinivasan self-assigned this Apr 16, 2016
@arunsrinivasan
Copy link
Member

Thanks for catching and reporting this immediately. Really appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants