diff --git a/R/step-join.R b/R/step-join.R index 8f447abd..97877edb 100644 --- a/R/step-join.R +++ b/R/step-join.R @@ -82,7 +82,7 @@ dt_call.dtplyr_step_join <- function(x, needs_copy = x$needs_copy) { anti = call2("[", lhs, call2("!", rhs), on = on), semi = call2("[", lhs, call2("unique", call2("[", lhs, rhs, which = TRUE, nomatch = NULL, on = on))) ) - + if (x$style == "full") { default_suffix <- c(".x", ".y") if (!identical(x$suffix, default_suffix)) { @@ -133,7 +133,6 @@ right_join.dtplyr_step <- function(x, y, ..., by = NULL, copy = FALSE, suffix = step_join(x, y, by, style = "right", copy = copy, suffix = suffix) } - #' @importFrom dplyr inner_join #' @export inner_join.dtplyr_step <- function(x, y, ..., by = NULL, copy = FALSE, suffix = c(".x", ".y")) { diff --git a/tests/testthat/test-step-join.R b/tests/testthat/test-step-join.R index 03f67d37..65ff4d19 100644 --- a/tests/testthat/test-step-join.R +++ b/tests/testthat/test-step-join.R @@ -346,10 +346,10 @@ test_that("performs cartesian joins as needed", { test_that("performs cross join", { df1 <- data.frame(x = 1:2, y = "a", stringsAsFactors = FALSE) df2 <- data.frame(x = 3:4) + expected <- dplyr::cross_join(df1, df2) %>% as_tibble() dt1 <- lazy_dt(df1, "dt1") dt2 <- lazy_dt(df2, "dt2") - expected <- left_join(df1, df2, by = character()) %>% as_tibble() expect_snapshot(left_join(dt1, dt2, by = character())) expect_equal(left_join(dt1, dt2, by = character()) %>% collect(), expected)