@@ -1240,7 +1240,7 @@ local({
12401240
12411241## NAs in join columns
12421242
1243- ### LHS equal to RHS and having NA on
1243+ ### LHS equal to RHS and having missing values in on= column
12441244local({
12451245 l = list(lhs = data.table(id1=c(1:2, NA), v1=1:3), rhs = data.table(id1=c(1:2, NA), v2=1:3))
12461246 expected = data.table(id1=c(1:2, NA), v1=1:3, v2=1:3)
@@ -1252,7 +1252,7 @@ local({
12521252 test(251.06, notcopied(setmergelist(l, on="id1", how="left", mult="error"), l))
12531253})
12541254
1255- ### Single match and RHS having NA on
1255+ ### Single match and RHS having missing values in on= column
12561256local({
12571257 l = list(lhs = data.table(id1=1:2, v1=1:2), rhs = data.table(id1=c(1L, NA, 3L), v2=1:3))
12581258 test(251.11, mergelist(l, on="id1", how="inner", mult="all"), data.table(id1=1L, v1=1L, v2=1L))
@@ -1266,12 +1266,13 @@ local({
12661266## exceeds overalloc for a table
12671267
12681268local({
1269- ac = getOption("datatable.alloccol")
1270- l = list(lhs = as.data.table(c(list(id1=integer()), setNames(replicate(ac + 10L, integer()), paste0("v", seq_len(ac + 10L))))), rhs=data.table(id1=2:1))
1269+ n_cols = getOption("datatable.alloccol") + 11L
1270+ l = list(lhs = setDT(replicate(n_cols, integer())), rhs=data.table(id1=2:1))
1271+ setnames(l$lhs, "V1", "id1")
12711272 test(291.01, mergelist(l, on="id1", how="inner", mult="all"), l$lhs[0L])
12721273 test(291.02, mergelist(l, on="id1", how="left", mult="all"), l$lhs[0L])
12731274 test(291.03, mergelist(l, on="id1", how="right", mult="all"), l$lhs[1:2][, "id1" := 2:1][])
1274- ## test overalloc for how=="full" && !nrow(out.i) && nrow(out.r) && length(setdiff(names(out.i), names(out.r))) that was failing when used set()
1275+ ## test overalloc for how=="full" && !nrow(out.i) && nrow(out.r) && length(setdiff(names(out.i), names(out.r))) that was failing when using set()
12751276 test(291.04, mergelist(l, on="id1", how="full", mult="all"), rbindlist(l, use.names=TRUE, fill=TRUE))
12761277 test(291.05, copied(mergelist(l, on="id1", how="left", mult="error"), l))
12771278 test(291.06, notcopied(setmergelist(l, on="id1", how="left", mult="error"), l))
0 commit comments