You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DT= data.table(a=1)
setindex(DT, a)
l=list(a=1)
DT[l, on=.NATURAL, verbose=TRUE]
Has output:
Joining but 'x' has no key, natural join using all 'x' columnsi.a has same type (double) as x.a. No coercion needed.
on= matches existing index, using index
Starting bmerge ...
forder.c received 1 rows and 1 columns
forderReuseSorting: opt=-1, took 0.000s
bmerge: looping bmerge_r took 0.000s
bmerge: took 0.000s
bmerge done in 0.000s elapsed (0.000s cpu)
Constructing irows for '!byjoin || nqbyjoin' ... 0.000s elapsed (0.000s cpu)
a
<num>
1: 1
A simple change gets us the more efficient join, we shouldn't have to do this:
DT[l, on=names(l), verbose=TRUE]
i.a has same type (double) as x.a. No coercion needed.
on= matches existing index, using index
Starting bmerge ...
forder.c received 1 rows and 1 columns
forderReuseSorting: opt=-1, took 0.000s
bmerge: looping bmerge_r took 0.000s
bmerge: took 0.000s
bmerge done in 0.001s elapsed (0.000s cpu)
Constructing irows for '!byjoin || nqbyjoin' ... 0.000s elapsed (0.000s cpu)
a
<num>
1: 1
Activity
aam936 commentedon Apr 6, 2026
I will take this issue
aam936 commentedon Apr 28, 2026
Are you saying that you want to change the joining method from
intersect()tobmerge(), or something else?jangorecki commentedon Apr 29, 2026
It still needs to be intersect but .NATURAL keyword has to be unpacked early enough for joining to detect columns used