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

Forward compatibility with dbplyr 2.5.0 #265

Merged
merged 1 commit into from
Feb 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion R/cte.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

#' @export
get_tables_from_sql.lazy_base_remote_query <- function(query) {
if (inherits(query$x, "dbplyr_table_ident")) {
if (inherits(query$x, "dbplyr_table_path")) { # dbplyr >= 2.5.0
utils::getFromNamespace("table_path_name", "dbplyr")(query$x)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hadley table_path_name() seems to be exported from dbplyr 2.5.0. Should we just use dbplyr::table_path_name() instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can, but it will cause a R CMD check WARNING If you submit to CRAN before dbplyr 2.5.0 is released.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. I will merge this in first and modify the function call when dbplyr 2.5.0 is released.

} else if (inherits(query$x, "dbplyr_table_ident")) { # dbplyr >= 2.4.0

Check warning on line 20 in R/cte.R

View check run for this annotation

Codecov / codecov/patch

R/cte.R#L18-L20

Added lines #L18 - L20 were not covered by tests
vctrs::field(query$x, "table")
} else {
as.character(query$x)
Expand Down
Loading