Skip to content

unkeyed join could use existing indexes #1439

@jangorecki

Description

@jangorecki

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.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions