-
Notifications
You must be signed in to change notification settings - Fork 12
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
partial evaluation of geom predicates only goes one level deep #146
Comments
The problem seems to be not the nesting, but that all functions are assumed to be remote. From the examples in
So this does work: crd_greenspaces <- bcdc_query_geodata("local-and-regional-greenspaces") %>%
filter(BBOX(local(st_bbox(crd_mun)), crs = "EPSG:3005")) %>% #<<
collect() |
I don't know if we can insert a |
Also works (using crd_greenspaces <- bcdc_query_geodata("local-and-regional-greenspaces") %>%
filter(BBOX(!!st_bbox(crd_mun), crs = "EPSG:3005")) %>% #<<
collect() |
In that sense the error you receive is actually quite good. Other than this part:
and this part:
So tweaking the error message and including an example should be sufficient? |
Yeah, the tricky part is going to be catching those in a general way so that we know when to throw that error... |
Can you just catch the dbplyr error and assume that dbplyr will catch all those cases? |
Instead of early evaluation of nested calls as previously attempted, modify the call to wrap nested calls in local() so that dbplyr::partial_eval knows to evaluate them. #146
Created on 2019-11-27 by the reprex package (v0.3.0)
The text was updated successfully, but these errors were encountered: