Skip to content

Don't retain keys when on rolling join/subset unless 'i' has key set. #1010

@arunsrinivasan

Description

@arunsrinivasan
require(data.table) ## 1.9.5
DT = data.table(x=c(-5,5), y=1:2, key="x")
#     x y
#1: -5 1
#2:  5 2

DT[J(c(2,0)), roll=TRUE]
#    x y
#1: 2 1
#2: 0 1

# key shouldn't be there.. 'x' is not sorted in the result.
key(DT[J(c(2,0)), roll=TRUE])
# [1] "x"

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions