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

unkeyed join could use existing indexes #1439

Closed
jangorecki opened this issue Nov 20, 2015 · 3 comments
Closed

unkeyed join could use existing indexes #1439

jangorecki opened this issue Nov 20, 2015 · 3 comments
Assignees
Milestone

Comments

@jangorecki
Copy link
Member

According to the title of #1130 Implement joins using secondary keys, I assume unkeyed join using on already uses indexes so it don't have to resort data to join.
But it seems to not use existing index.

library(data.table)
options(datatable.verbose=TRUE)
options(datatable.auto.index=TRUE)
dt1 = data.table(a=letters[c(3L,1L,2L)])
dt2 = data.table(a=letters[c(2L,1L,3L)])
set2keyv(dt1, "a")
# forder took 0 sec
set2keyv(dt2, "a")
# forder took 0 sec
dt1[dt2, on = c("a" = "a")]
# Starting bmerge ...done in 0 secs
#    a
#1: b
#2: a
#3: c

If it does use index please turn that FR to extend verbose=TRUE to mention that.

@arunsrinivasan
Copy link
Member

Absolutely. I'm working on [.data.table now. I've already added this to the list, but good to have this as an issue.

@jangorecki
Copy link
Member Author

any chance to have it labelled for 1.9.8 release? asking cause I'm going to mention that feature in a post :)

@jangorecki
Copy link
Member Author

this is huge, thanks!

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

No branches or pull requests

2 participants