-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Join columns mislabelled #137
Labels
bug
an unexpected problem or unintended behavior
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Minimal reprex: library(data.table)
library(dtplyr)
library(dplyr, warn.conflicts = FALSE)
x1 <- lazy_dt(data.table(x_left = 1:3, y = 1))
x2 <- lazy_dt(data.table(x_right = 2:4, z = 2))
left_join(x1, x2, by = c("x_left" = "x_right"))
#> Source: local data table [?? x 4]
#> Call: `_DT2`[`_DT1`, on = .(x_right = x_left), allow.cartesian = TRUE]
#>
#> x_right z y
#> <int> <dbl> <dbl>
#> 1 1 NA 1
#> 2 2 2 1
#> 3 3 2 1
#>
#> # Use as.data.table()/as.data.frame()/as_tibble() to access results Created on 2019-12-24 by the reprex package (v0.3.0) I don't think that you're getting a right join (because if that was the case you'd expect |
hadley
added
bug
an unexpected problem or unintended behavior
and removed
reprex
needs a minimal reproducible example
labels
Dec 24, 2019
hadley
changed the title
Left join returns the result of right join
Join columns mislabelled
Dec 24, 2019
@hadley Thanks for correcting my question and fixing this bug :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for making this nice tool firstly. I got an error when I tried to rewrite code with
dtplyr
. I debugged the code and found theleft_join()
returns the result of right join and vice versa.Join result
The text was updated successfully, but these errors were encountered: