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

Test across() better #760

Closed
mgirlich opened this issue Jan 19, 2022 · 0 comments · Fixed by #766
Closed

Test across() better #760

mgirlich opened this issue Jan 19, 2022 · 0 comments · Fixed by #766

Comments

@mgirlich
Copy link
Collaborator

mgirlich commented Jan 19, 2022

Adapt big test set from dplyr

library(dplyr, warn.conflicts = FALSE)
library(dbplyr, warn.conflicts = FALSE)
memdb_frame(g = 1, x = 1, y = 1) %>% 
  group_by(g) %>% 
  summarise(across(everything(), ~ 0)) %>% 
  show_query()
#> <SQL>
#> SELECT `g`, 0.0 AS `g`, 0.0 AS `x`, 0.0 AS `y`
#> FROM `dbplyr_001`
#> GROUP BY `g`

Created on 2022-01-19 by the reprex package (v2.0.1)

  • across() should default to everything()
library(dplyr, warn.conflicts = FALSE)
suppressMessages(devtools::load_all("~/GitHub/dbplyr/"))

tibble(g = 1, x = 1, y = 1) %>% group_by(x) %>% summarise(across())
#> # A tibble: 1 × 3
#>       x     g     y
#>   <dbl> <dbl> <dbl>
#> 1     1     1     1
memdb_frame(g = 1, x = 1, y = 1) %>% group_by(x) %>% summarise(across())
#> # Source:   lazy query [?? x 1]
#> # Database: sqlite 3.37.0 [:memory:]
#>       x
#>   <dbl>
#> 1     1

Created on 2022-01-19 by the reprex package (v2.0.1)

This was referenced Jan 19, 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