Closed ateucher closed 11 months ago
This is now handled by explicitly wrapping locally evaluated expressions in local()
, and supplying column names for remote columns in the .colnames
argument. The local()
has to be done by the user, the .colnames
are handled internally. It was closed by #305.
x <- c("a", "b")
y <- data.frame(id = x, stringsAsFactors = FALSE)
bcdata:::cql_translate(foo == local(y$id[2]), .colnames = "foo")
#> <SQL> ("foo" = 'b')
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
bcdata:::cql_translate(foo == local(y$id[2]), .colnames = "foo")
#> <SQL> ("foo" = 'b')
Created on 2023-10-06 with reprex v2.0.2
This section is not successfully wrapping the
y$id[[2]]
in"local()"
, so it then findsdplyr::id()
instead of evaluatingy$id[[2]]
to get the value ("b"
).