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

Getting sql_query_explain with pool 1.0 #167

Closed
vituri opened this issue Feb 20, 2023 · 0 comments · Fixed by #168
Closed

Getting sql_query_explain with pool 1.0 #167

vituri opened this issue Feb 20, 2023 · 0 comments · Fixed by #168

Comments

@vituri
Copy link

vituri commented Feb 20, 2023

When updating to pool 1.0 I noticed that the explain function stopped working.

Here is a regexp:

library(dplyr, warn.conflicts = FALSE)

con <- pool::dbPool(RSQLite::SQLite())
copy_to(con, data.frame(x = 1, y = 2, z = 3), name = 'df1', temporary = FALSE)
#> # Source:   table<df1> [1 x 3]
#> # Database: sqlite 3.39.4 []
#>       x     y     z
#>   <dbl> <dbl> <dbl>
#> 1     1     2     3

tbl(con, 'df1') %>% 
  filter(x >= 1) %>% 
  explain()
#> <SQL>
#> SELECT *
#> FROM `df1`
#> WHERE (`x` >= 1.0)
#> 
#> <PLAN>
#> Error in UseMethod("sql_query_explain"): método não aplicável para 'sql_query_explain' aplicado a um objeto de classe "c('Pool', 'R6')"

In the previous CRAN version it worked fine.

PS: I am using the current github version, because I needed to use the left_join function (which is now working as usual).

Created on 2023-02-19 with reprex v2.0.2

hadley added a commit that referenced this issue Feb 21, 2023
hadley added a commit that referenced this issue Feb 21, 2023
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