Skip to content
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

* in joins #898

Closed
hadley opened this issue May 25, 2022 · 2 comments · Fixed by #959
Closed

* in joins #898

hadley opened this issue May 25, 2022 · 2 comments · Fixed by #959
Milestone

Comments

@hadley
Copy link
Member

hadley commented May 25, 2022

Would be nice if:

library(dbplyr)
library(dplyr, warn.conflicts = FALSE)

lf1 <- lazy_frame(!!!setNames(as.list(1:26), letters))
lf2 <- lazy_frame(a = 1, a1 = 1, a2 = 1)

lf1 |> left_join(lf2)
#> Joining, by = "a"
#> <SQL>
#> SELECT
#>   `LHS`.`a` AS `a`,
#>   `b`,
#>   `c`,
#>   `d`,
#>   `e`,
#>   `f`,
#>   `g`,
#>   `h`,
#>   `i`,
#>   `j`,
#>   `k`,
#>   `l`,
#>   `m`,
#>   `n`,
#>   `o`,
#>   `p`,
#>   `q`,
#>   `r`,
#>   `s`,
#>   `t`,
#>   `u`,
#>   `v`,
#>   `w`,
#>   `x`,
#>   `y`,
#>   `z`,
#>   `a1`,
#>   `a2`
#> FROM `df` AS `LHS`
#> LEFT JOIN `df` AS `RHS`
#>   ON (`LHS`.`a` = `RHS`.`a`)

Created on 2022-05-25 by the reprex package (v2.0.1)

Instead produced:

SELECT
  `LHS`.*, `a1`, `a2`
FROM `df` AS `LHS`
LEFT JOIN `df` AS `RHS`
  ON (`LHS`.`a` = `RHS`.`a`)

No idea how feasible this is.

@mgirlich
Copy link
Collaborator

This should be relatively easy. I just wonder how relevant this is after inlining select() into joins (#875 and #876).

@hadley
Copy link
Member Author

hadley commented May 27, 2022

Isn't it just as relevant? Maybe I'm missing how you think it would interact.

@mgirlich mgirlich added this to the 2.3.0 milestone Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants