Skip to content

Commit

Permalink
Eliminate dplyr warning
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Sep 5, 2024
1 parent 495d128 commit 17f41d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions R/step-join.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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")) {
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-step-join.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 17f41d2

Please sign in to comment.