Skip to content

CJ sorted setkey but wrong order #1513

@alexdeng

Description

@alexdeng

This wrong order resulted in CJ (with default sorted = TRUE) is causing bugs in .[i, join

a = CJ(c(1,2,2),c(1,2,3))
a
V1 V2
1: 1 1
2: 1 2
3: 1 3
4: 2 1
5: 2 2
6: 2 3
7: 2 1
8: 2 2
9: 2 3
setkey(a,V1,V2)
Warning message:
In setkeyv(x, cols, verbose = verbose, physical = physical) :
Already keyed by this key but had invalid row order, key rebuilt. If you didn't go under the hood please let datatable-help know so the root cause can be fixed.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions