You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A useful feature of dbplyr is automatically passing through unknown calls straight into SQL, e.g. some flavors support ANY_VALUE() to take a value from a column arbitrarily during aggregation:
SELECT grp, ANY_VALUE(x) AS some_x
FROMmy_schema.tblGROUP BY grp
However, within packages, this presents the classic issue with R CMD check notes that ANY_VALUE() is an undefined function, from the static R checker's point of view.
rlang offers .data and .env masks for this purpose:
Given that .env$mean(x) clearly implies that we should evaluate mean() locally, I wonder if it's not too much of an abuse for .data$mean(x) to mean evaluate mean(x) in the database? (i.e. translate it to SQL)
A useful feature of dbplyr is automatically passing through unknown calls straight into SQL, e.g. some flavors support
ANY_VALUE()
to take a value from a column arbitrarily during aggregation:Will give something like
However, within packages, this presents the classic issue with
R CMD check
notes thatANY_VALUE()
is an undefined function, from the static R checker's point of view.rlang offers
.data
and.env
masks for this purpose:https://rlang.r-lib.org/reference/dot-data.html
Could dbplyr offer something similar, e.g. an
.sql
mask we could use as:The text was updated successfully, but these errors were encountered: