@@ -8569,18 +8569,18 @@ test(1601.1, merge(DT1, DT1, by="a"), data.table(a=1, key="a"))
85698569
85708570# Test 1601.2: Merge DT1 with DT0 on column 'a'
85718571test(1601.2, merge(DT1, DT0, by="a"),
8572- warning="Input data.table 'y' has no columns.",
8573- error="The following columns are missing:\n - From `y` : a")
8572+ warning="Input data.table y has no columns.",
8573+ error="The following columns are missing: - From y : a")
85748574
85758575# Test 1601.3: Merge DT0 with DT1 on column 'a'
85768576test(1601.3, merge(DT0, DT1, by="a"),
8577- warning="Input data.table 'x' has no columns.",
8578- error="The following columns are missing:\n - From `x` : a")
8577+ warning="Input data.table x has no columns.",
8578+ error="The following columns are missing: - From x : a")
85798579
85808580# Test 1601.4: Merge DT0 with DT0 on column 'a'
85818581test(1601.4, merge(DT0, DT0, by="a"),
85828582 warning="Neither of the input data.tables to join have columns.",
8583- error="The following columns are missing:\n - From `x` : a\n - From `y` : a")
8583+ error="The following columns are missing: - From x : a - From y : a")
85848584
85858585# fix for #1549
85868586d1 <- data.table(v1=1:2,x=x)
@@ -13528,20 +13528,12 @@ test(1962.016, merge(DT1, DT2, by.x = 'a', by.y = c('a', 'V')),
1352813528test(1962.017, merge(DT1, DT2, by = 'V', by.x = 'a', by.y = 'a'),
1352913529 data.table(a = 2:3, V.x = c("a", "a"), V.y = c("b", "b"), key = 'a'),
1353013530 warning = 'Supplied both.*argument will be ignored')
13531- test(1962.018, {
13532- if (!"z" %in% colnames(DT1)) {
13533- stop("Elements listed in `by.x` are missing from x: z")
13534- }
13535- merge(DT1, DT2, by.x = 'z', by.y = 'a')
13536- }, error = 'Elements listed in `by.x` are missing from x: z')
13537-
13538- test(1962.019, {
13539- if (!"z" %in% colnames(DT2)) {
13540- stop("Elements listed in `by.y` are missing from y: z")
13541- }
13542- merge(DT1, DT2, by.x = 'a', by.y = 'z')
13543- }, error = 'Elements listed in `by.y` are missing from y: z')
13544-
13531+ test(1962.018,
13532+ merge(DT1, DT2, by.x = 'z', by.y = 'a'),
13533+ error = 'The following columns listed in by.x are missing from x: z')
13534+ test(1962.019,
13535+ merge(DT1, DT2, by.x = 'a', by.y = 'z'),
13536+ error = 'The following columns listed in by.y are missing from y: z')
1354513537test(1962.0201, merge(DT1, DT2, by=character(0L)), ans) # was error before PR#5183
1354613538test(1962.0202, merge(DT1, DT2, by=NULL), ans) # test explicit NULL too as missing() could be used inside merge()
1354713539test(1962.021, {
@@ -16927,7 +16919,7 @@ test(2144, rbind(DT,list(c=4L,a=7L)), error="Column 1 ['c'] of item 2 is missing
1692716919A = data.table(A='a')
1692816920B = data.table(B='b')
1692916921test(2145.1, A[B, on=character(0)], error = "'on' argument should be a named atomic vector")
16930- test(2145.2, merge(A, B, by=character(0) ), error = "non-empty vector of column names for `by` is required.")
16922+ test(2145.2, merge(A, B, by=character(0) ), error = "A non-empty vector of column names for by is required.")
1693116923test(2145.3, merge(A, B, by.x=character(0), by.y=character(0)), error = "non-empty vector of column names is required")
1693216924# Also shouldn't crash when using internal functions
1693316925test(2145.4, bmerge(A, B, integer(), integer(), 0, c(FALSE, TRUE), NA, 'all', integer(), FALSE), error = 'icols and xcols must be non-empty')
@@ -18010,7 +18002,7 @@ test(2230.4, setDF(merge(DT, y, by="k2", incomparables=c(1, NA, 4, 5))), merge(x
1801018002test(2230.5, setDF(merge(DT, y, by="k2", incomparables=c(NA, 3, 4, 5))), merge(x, y, by="k2", incomparables=c(NA,3,4,5)))
1801118003test(2230.6, merge(DT, y, by="k2", unk=1), merge(DT, y, by="k2"), warning="Unknown argument 'unk' has been passed.")
1801218004test(2230.7, merge(DT, y, by="k2", NULL, NULL, FALSE, FALSE, FALSE, TRUE, c(".x", ".y"), TRUE, getOption("datatable.allow.cartesian"), NULL, 1L),
18013- merge(DT, y, by="k2"), warning=c("Supplied both `by` and ` by.x/by.y`. `by` argument will be ignored.", "Passed 1 unknown and unnamed arguments."))
18005+ merge(DT, y, by="k2"), warning=c("Supplied both by and by.x/by.y. by argument will be ignored.", "Passed 1 unknown and unnamed arguments."))
1801418006
1801518007# weighted.mean GForce optimized, #3977
1801618008old = options(datatable.optimize=1L)
0 commit comments