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

Keyed join with empty data.table and roll='nearest' segfaults #4499

Closed
tlapak opened this issue May 26, 2020 · 1 comment · Fixed by #4272
Closed

Keyed join with empty data.table and roll='nearest' segfaults #4499

tlapak opened this issue May 26, 2020 · 1 comment · Fixed by #4272
Milestone

Comments

@tlapak
Copy link
Contributor

tlapak commented May 26, 2020

Somewhat related to #4060 in appearance but crashes on all versions of R. Different mechanism, similar appearance. Found this while working on amending #4272. I'll submit a fix soon (hopefully). Should I put it in with #4272 or submit a separate PR? These are all related in that they are triggered by passing zero length icols/xcols to Cbmerge.

I'm not a hundred percent on what this should do, but I'd suggest to have it behave the same way for all values of roll.

DT = data.table(A="a", key="A")
DT[data.table(), roll = 'nearest']  # Will segfault
# Proposed return Value == DT[0]:
# Empty data.table (0 rows and 1 cols): A
@jangorecki
Copy link
Member

jangorecki commented May 26, 2020

It should raise error that there is no column to join to. In same PR should be fine.

@tlapak tlapak changed the title Keyed join with empty data.table and roll='nearest' still segfaults Keyed join with empty data.table and roll='nearest' segfaults May 28, 2020
@jangorecki jangorecki added this to the 1.12.9 milestone Jun 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants