Skip to content

Commit 6cd69f0

Browse files
add test
1 parent 70c64ac commit 6cd69f0

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

R/data.table.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1526,6 +1526,7 @@ replace_dot_alias = function(e) {
15261526
if (length(byval) && length(byval[[1L]])) {
15271527
if (!bysameorder && isFALSE(byindex)) {
15281528
if (verbose) {last.started.at=proc.time();catf("Finding groups using forderv ... ");flush.console()}
1529+
browser()
15291530
o__ = forderv(byval, sort=keyby, retGrp=TRUE)
15301531
# The sort= argument is called sortGroups at C level. It's primarily for saving the sort of unique strings at
15311532
# C level for efficiency when by= not keyby=. Other types also retain appearance order, but at byte level to

inst/tests/tests.Rraw

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20689,3 +20689,8 @@ if (test_bit64) {
2068920689
test(2300.3, DT1[DT2, on='id'], error="Incompatible join types")
2069020690
test(2300.4, DT2[DT1, on='id'], error="Incompatible join types")
2069120691
}
20692+
20693+
# by=foo(KEY) does not retain key (no way to guarantee monotonic transformation), #5583
20694+
DT = data.table(a=1:2, key='a')
20695+
test(2301.1, DT[, .N, by=.(b=rev(a))], data.table(b=2:1, N=1L))
20696+
test(2301.2, DT[, .(N=1L), by=.(b=rev(a))], data.table(b=2:1, N=1L)) # ensure no interaction with GForce

0 commit comments

Comments
 (0)