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
[question] expected output of x %>% dbplyr::compute() %>% dbplyr::remote_name()
#639
Comments
In particular, now if I run the following with
I see the table had a remote name to begin with, but then after |
And same with the memdb_frame example too (i.e., if I simplify the example I mentioned in the issue to something matching the sparklyr example from the above):
|
^^ but the examples above do return a non-NULL remote name after compute() with dbplyr 2.0, and I believe there was some change in dbplyr 2.1.x that caused the NULL output |
Proposed change: #649 (i.e., I think |
I think it would make more sense to make remote_name <- function(x) {
UseMethod("remote_name")
}
#' @export
remote_name.tbl_lazy <- function(x) {
remote_name(x$ops)
}
#' @export
remote_name.op_base <- function(x) {
x$x
}
#' @export
remote_name.op_group_by <- function(x) {
remote_name(x$x)
}
#' @export
remote_name.op_ungroup <- function(x) {
remote_name(x$x)
}
#' @export
remote_name.default <- function(x) {
return()
} |
@mgirlich That's a great idea! I have revised my PR accordingly. |
For example, consider
With dbplyr version 2.1.1 the output is
NULL
, but I seem to remember some earlier version of dbplyr would produce a non-NULL
output, and also based on how I understood thedbplyr
documentation, a non-NULL
output is expected, right?BTW the aforementioned
NULL
/ non-NULL
outputs also apply to Spark dataframes insparklyr
or other DB backends, not justmemdb_frame
s.The text was updated successfully, but these errors were encountered: