From 1dc995863aecbb3eb9c36d97726132b6523514e1 Mon Sep 17 00:00:00 2001 From: Sebastian Krantz Date: Sat, 11 May 2024 16:44:26 +0200 Subject: [PATCH] Fixing #574. --- R/join.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/join.R b/R/join.R index e69d8dee..7fbf8d7b 100644 --- a/R/join.R +++ b/R/join.R @@ -209,7 +209,7 @@ join <- function(x, y, } } if(cond) { # TODO: special case ? 1 distinct value etc.?? - tind <- seq_len(tsize)[-um] # TODO: Table may not be unique. + tind <- if(length(um)) seq_len(tsize)[-um] else seq_len(tsize) # TODO: Table may not be unique. res_nrow <- length(m) + length(tind) x_res <- .Call(C_subsetDT, x, seq_len(res_nrow), seq_along(x)[-ixon], TRUE) # Need check here because oversize indices !! y_res <- .Call(C_subsetDT, y, vec(list(m, tind)), seq_along(y)[-iyon], TRUE) # Need check here because oversize indices !!