We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2749ae2 commit 2e5ad96Copy full SHA for 2e5ad96
inst/tests/tests.Rraw
@@ -21848,3 +21848,10 @@ d1 = data.table(V1 = c(1L, 0L, 1L), V2 = c("a", "a", "b"), key = "V2")
21848
d2 = d1[, .(V1, label = c("one", "zero", "one"), V2)]
21849
r = d2[data.table(label = "one"), on = "label", allow.cartesian = TRUE]
21850
test(2344.02, nrow(r), 2L)
21851
+# join result of keyed input is the same as unkeyed input
21852
+test(2344.03, setkey(d1[, .(V1, label = c("one", "zero", "one"), V2)][data.table(label = "one"), on = "label", allow.cartesian = TRUE], NULL),
21853
+ setkey(d1, NULL)[, .(V1, label = c("one", "zero", "one"), V2)][data.table(label = "one"), on = "label", allow.cartesian = TRUE])
21854
+
21855
+# keep subset of multiple keys until no missing key with changing order of key columns
21856
+DT = data.table(V1 = 1:2, V2 = 3:4, V3 = 5:6, key = c("V1", "V2", "V3"))
21857
+test(2344.04, key(DT[, .(V4 = c("b", "a"), V2, V5 = c("y", "x"), V1)]), c("V1", "V2"))
0 commit comments