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

dots in sql(...) should be evaluated locally #952

Closed
mgirlich opened this issue Jul 29, 2022 · 0 comments · Fixed by #956
Closed

dots in sql(...) should be evaluated locally #952

mgirlich opened this issue Jul 29, 2022 · 0 comments · Fixed by #956
Milestone

Comments

@mgirlich
Copy link
Collaborator

Currently they are translated but I don't see why you would want that. Instead, it makes it more difficult to create SQL programmatically.

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

lazy_frame(x = 1) %>% 
  mutate(x = sql(paste0("x")))
#> <SQL>
#> SELECT CONCAT_WS('', 'x') AS `x`
#> FROM `df`

lazy_frame(x = 1) %>% 
  mutate(x = sql(!!paste0("x")))
#> <SQL>
#> SELECT x AS `x`
#> FROM `df`

Created on 2022-07-29 by the reprex package (v2.0.1)

Fixing this would also help in #951.

@mgirlich mgirlich added this to the 2.3.0 milestone Jul 29, 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.

1 participant