Skip to content

Commit 9e1297e

Browse files
committed
rename optimization parameter
1 parent 1e6ad03 commit 9e1297e

File tree

5 files changed

+261
-261
lines changed

5 files changed

+261
-261
lines changed

R/test.data.table.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,11 +361,11 @@ gc_mem = function() {
361361
# nocov end
362362
}
363363

364-
test = function(num,x,y=TRUE,error=NULL,warning=NULL,message=NULL,output=NULL,notOutput=NULL,ignore.warning=NULL,options=NULL,env=NULL,optimization=NULL) {
364+
test = function(num,x,y=TRUE,error=NULL,warning=NULL,message=NULL,output=NULL,notOutput=NULL,ignore.warning=NULL,options=NULL,env=NULL,optimize=NULL) {
365365
# if optimization is provided, test across multiple optimization levels
366366
if (!is.null(optimization)) {
367367
cl = match.call()
368-
cl$optimization = NULL # Remove optimization levels from the recursive call
368+
cl$optimize= NULL # Remove optimization levels from the recursive call
369369

370370
# Check if y was explicitly provided (not just the default)
371371
y_provided = !missing(y)

inst/tests/benchmark.Rraw

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,10 @@ test(301.1, nrow(DT[,sum(B),by=C])==100010)
193193
set.seed(1)
194194
DT = data.table(a=sample(1:100, 1e6, replace=TRUE), b=sample(1:1000, 1e6, replace=TRUE), key="a")
195195
opt = c(0L,2L)
196-
test(637.1, optimization=opt, copy(DT)[, m:=sum(b), by=a][1:3], data.table(a=1L, b=c(156L, 808L, 848L), m=DT[J(1), sum(b)], key="a"))
197-
test(637.2, optimization=opt, key(copy(DT)[J(43L), a:=99L]), NULL)
196+
test(637.1, optimize=opt, copy(DT)[, m:=sum(b), by=a][1:3], data.table(a=1L, b=c(156L, 808L, 848L), m=DT[J(1), sum(b)], key="a"))
197+
test(637.2, optimize=opt, key(copy(DT)[J(43L), a:=99L]), NULL)
198198
setkey(DT, a)
199-
test(637.3, optimization=opt, key(copy(DT)[, a:=99L, by=a]), NULL)
199+
test(637.3, optimize=opt, key(copy(DT)[, a:=99L, by=a]), NULL)
200200

201201
# Test X[Y] slowdown, #2216
202202
# Many minutes in 1.8.2! Now well under 1s, but 10s for very wide tolerance for CRAN. We'd like CRAN to tell us if any changes

0 commit comments

Comments
 (0)